Wednesday 30 January 2013

WAP TO FIND OUT BIGGER & EQUAL NUMBER FROM THREE NUMBERS (TERNARY OPERATORS)


void main ()
{
int a,b,c;
clrscr ();
printf ("Enter the value of A: ");
scanf("%d",&a);
printf ("Enter the value of B: ");
scanf ("%d",&b);
printf ("Enter the value of C: ");
scanf ("%d",&c);
(a>b && a>c)?printf("A is Big"):(b>a && b>c)?printf("B is Big"):(a==b && b==c)?printf("All are Eqaul"):printf("C is Big");
getch ();
}

No comments:

Post a Comment

Comment