Program:
#include<stdio.h>
#include<conio.h>
void main()
{
int a, b, c, max;
clrscr();
printf("Enter any Three Numbers : ");
scanf("%d%d%d", &a, &b, &c);
if(a>b)
{
if(a>c)
max=a;
else
max=c;
}
else
{
if(b>c)
max=b;
else
max=c;
}
printf("Maximum Value is : %d", max);
getch();
}
Output:
Enter any Three Numbers : 10 20 30
Maximum Value is : 30
Next Topic :
Previous Topic :
No comments:
Post a Comment