C Program to find the greatest between given three numbers
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
printf("\nEnter any three
numbers \n");
scanf("%d%d%d",&a,&b,&c);
if(a>b)
{
if(a>c)
printf("\n%d is greatest"
,a);
else
printf("\n%d is greatest"
,c);
}
else
{
if(b>c)
printf("\n%d is greatest"
,b);
else
printf("\n%d is greatest"
,c);
}
getch();
}
Output :-
Enter any three numbers
5
8
4
8 is greatest
0 Comments
Tell us your queries or more topics which you want