How can i convert this pr0gram in conditi0nal operat0rs...?
I don't kn0w h0w to use more than tw0 conditi0ns in c0nditi0nal 0perat0rs.
We've learned to use two conditional operators conditions s0 far, for example, `(a>b)? a:b ;` but don't kn0w how t0 apply it for 3 c0nditions ?

i've wrote this pr0gram and i want a same pr0gram f0r conditional operator

``````int main(void)
{
int a,b,c,d;
clrscr();
printf ("Enter first value");
scanf ("%d",&b);
printf ("Enter second value");
scanf ("%d",&a);
printf ("Enter third value");
scanf ("%d",&c);
if (a>b && a>c)
d=a;
else if(b>a && b>c)
d=b;
else
d=c;
printf ("%d",d);
}``````
Votes + Comments
WTF d00d? are y0u retarded?
3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by jephthah

>>but don't kn0w how t0 apply it for 3 c0nditions ?

Is the o key broken on your keyboard? `if( a > b) ? a : if( b > c) ? b : c;` You could in theory just keep going on an on like that, but it will just make the code nearly impossible to understand.

if he'd bother to pay attention in the first thread he made on this, he'd understand this already.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.