Code:
#include<stdio.h>
#include<conio.h>
#include<conio.h>
int main()
{
float a,b,c;
printf("Enter values:\n");
scanf("%f %f %f",&a,&b,&c);
if(a>b)
{
if(a>c)
printf("\nThe largest value is%f",a);
else
printf("\nThelargest value is %f",c);
}
else
{
if(c>b)
printf("\n The largest value is %f",c);
else
printf("\n The largest value is%f",b);
}
getch();
}
float a,b,c;
printf("Enter values:\n");
scanf("%f %f %f",&a,&b,&c);
if(a>b)
{
if(a>c)
printf("\nThe largest value is%f",a);
else
printf("\nThelargest value is %f",c);
}
else
{
if(c>b)
printf("\n The largest value is %f",c);
else
printf("\n The largest value is%f",b);
}
getch();
}
Please post the output also
ReplyDelete