//find the gretest number between three numbers
#include <stdio.h >
int main (){
int a,b,c;
printf ("enter three numbers :");
scanf ("%d%d%d",&a,&b,&c);
if (a>b && b>c){
printf ("%d is the gretest number",a);
}
else if (b>c&&c>a){
printf ("%d is the gretest number",b);
}
else if (c>a&&a>b){
printf ("%d is the gretest number",c);
}
else {
printf ("all numbers are equal");
}
return 0;
}
No comments:
Post a Comment