// program to get greatest number among three numbers
#include<stdio.h>
#include<conio.h>
void main()
{
float a,b,c;
printf(“enter three numbers\n”);
scanf(“%f%f%f”,&a,&b,&c);
if(a>b &&a>c)
{
printf(“the greatest number=%f\n”,a);
}
elseif(b>a &&b>c)
{
printf(“the greatest number=%f\n”,b);
}
else
{
printf(“the greatest number=%f\n”,c);
}
getch();
}
No comments:
Post a Comment