Jump to content

Find the greatest number from 3 integers using C

From IdeaWazaWiki
Revision as of 11:44, 19 December 2006 by wikademia>Milan (New page: <pre>→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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
/*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();
}