/ Undifined / 7 - WAP to find the greatest of three number.

7 - WAP to find the greatest of three number.

 WAP to find the greatest of three number.

#include<stdio.h>
#include<conio.h>
 
void main()
 
{
 
int a,b,c;
 
clrscr();
 
printf("Enter the value of a:");
 
scanf("%d",&a);
 
printf("\nEnter the value of b:");
 
scanf("%d",&b);
 
printf("\nEnter the value of c:");
 
scanf("%d",&c);
 
if(a>b)
 
{if(a>c)
 
printf("a is largest");
 
else
 
printf("c is largest");}
 
else
 
if(b>c)
 
printf("b is largest");
 
else
 
printf("c is largest");
 
getch();
 
}
Output 
Enter the value of a:34
 
Enter the value of b:334
 
Enter the value of c:76
 
B is largest

about author

Blogger Sens it website about blogger templates and blogger widgets you can find us on social media
Previous Post :Go to tne previous Post
Next Post:Go to tne Next Post

No comments:

Post a Comment