/*to read 3 numbers and display greatest one*/
#include<stdio.h>
#include<stdlib.h>
int main( )
{
float a,b,c;
printf ("enter the numbers: ");
scanf ("%f%f%f",&a,&b,&c);
if (a>b&&a>c)
printf ("%f is greatest",a);
else if (b>c)
printf ("%f is greatest",b);
else
printf ("%f is greatest",c);
system ("pause");
return 0;
}
No comments:
Post a Comment