#include<stdio.h>
#include<conio.h>
int main(){
float a, b, c;
clrscr();
printf("Enter three numbers: ");
scanf("%f %f %f", &a, &b, &c);
if (a>b)
{
if(a>c)
printf("Largest number = %.2f",a);
else
printf("Largest number = %.2f",c);
}
else
{
if(b>c)
printf("Largest number = %.2f",b);
else
printf("Largest number = %.2f",c);
}
getch();
return 1;
}
#include<conio.h>
int main(){
float a, b, c;
clrscr();
printf("Enter three numbers: ");
scanf("%f %f %f", &a, &b, &c);
if (a>b)
{
if(a>c)
printf("Largest number = %.2f",a);
else
printf("Largest number = %.2f",c);
}
else
{
if(b>c)
printf("Largest number = %.2f",b);
else
printf("Largest number = %.2f",c);
}
getch();
return 1;
}
No comments:
Post a Comment