/*gowrikausalya.blogspot.com*/
/*c-program to FIND MAXIMUM OF THREE NUMBERS USING(IF) STATEMENT*/
#include<stdio.h>#include<conio.h>
int main()
{
float a, b, c, max;
printf("Enter three numbers : \n");
scanf("%f %f %f",&a,&b,&c);
max=a;
if(b>max)
max=b;
if(c>max)
max=c;
printf("Largest of three numbers is\t%f",max);
getch();
}
The program displays the following output:-
Enter three numbers :
1000 3588 2586
Largest of three numbers is 3588.000000
No comments:
Post a Comment