Code to find greatest number

Code to find greatest number


#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
printf("Enter a,b and c");
scanf("%d%d%d",&a,&b,&c);
if((a>b)&&(a>c))
{
printf("greatest number=%d",a);
}
else if((b>c)&&(b>a))
{
printf("greatest number=%d",b);
}
else
{
printf("greatest number=%d",c);
}
getch();
}


Output



Comments

Popular posts from this blog

Code for pattern 6

Code to check leap year