Search Your C Program

Monday, 30 January 2012

Program to find Greater from three using conditional operators

#include<stdio.h>
#include<conio.h>
void main()
{
                  int a,b,c,big;
                  clrscr();
                  printf("\n Enter three numbers ");
                  scanf(" % d  %d  %d ",&a,&b,&c);
                  big=a>b?(a>c?a:c):(b>c?b:c);
                  printf("\n Biggest Number = %d",big);
                  getch();
}
                

No comments:

Post a Comment