## Adobe Interview Question Development Support Engineers

- 0of 0 votes
find the maximum of three integers using conditional operator ?

we can use concept

suppose if b>a then below concept can give b as output

c is average of a and b(in between) ;

d---> distance between avg and number(a or b);

c=(a+b)/2;

d=abs(a-b)/2;

so max number will be (c+d)..

a--------c--------b

<---d--->|<--d---->

so max that is b is (c+d);

for three number now get between b and another number using same concept.

x>y ? x>z ? x : z : y > z ? y : z

- Anonymous on September 27, 2010 Edit | Flag Reply