Search Your Keyword

A One Massage for users

C Program BD say you

Hi, If you are new in our blog and to get support about C program, than you must select your level from right side in this blog.Such as, If you want to learn than you select Entry Level for learning and If you are known the basic of C program than you select Solution Level.


Saturday, September 14, 2019

Q10. Write a c program that print the largest of the three numbers using if-else statement.

C program that print the largest of the three numbers using if-else statement:-
#include<stdio.h>
#include<conio.h>

void main()
{
float a, b, c;
clrscr();

printf("Enter three number with space\n");
scanf("%f %f %f", &a, &b, &c);


printf("\n The largest number is:");
if(a>b)
{
if(a>c)
{
printf("%.2f",a);
}
else
{
printf("%.2f",c);
}
}
else
{
if(c>b)
{
printf("%.2f",c);
}
else
{
printf("%.2f",b);
}
}
getch();
}

C program that print the largest of the three numbers using if-else statement.

C program to find largest number, largest number finding with c program, 

No comments:

Post a Comment