Jump to content

Find the greatest number from 3 integers using C

From IdeaWazaWiki
Revision as of 14:05, 19 December 2006 by wikademia>JWSchmidt (cat)
/*To check which of the 3 unequal integers is the greatest*/
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter three unequal integers");
scanf("%d%d%d",&a,&b,&c);
printf("%d",(a>b?a:b)>c?(a>b?a:b):c);
getch();
}