Search This Blog

July 10, 2014

Write a Program to enter three Numbers and find the greatest one

#include <stdio.h>
#include <conio.h>
int main( )
{
int a,b,c;
printf("Enter the three numbers");
scanf("%d%d%d",&a,&b,&c);
if(a>b && a>c)
{
printf("%d is Gretest among %d,%d,%d",a,a,b,c);


}
else
if(b>a && b>c)
{
printf("%d is Gretest among %d,%d,%d",b,a,b,c);

}
else
{
printf("%d is Gretest among %d,%d,%d",c,a,b,c);
}
getch ();
return 0;
}


No comments:

Post a Comment

Earn Money From Home