#include<stdio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter three numbers\n");
scanf("%d %d %d",&a,&b,&c);
if(b>a)
{
if(b>c)
{
printf("%d is greatest",b);
}
else
{
printf("%d is greatest",c);
}
}
else
{
if(a>c)
{
printf("%d is greatest",a);
}
else
{
printf("%d is greatest",c);
}
}
getch();
}
void main()
{
int a,b,c;
clrscr();
printf("Enter three numbers\n");
scanf("%d %d %d",&a,&b,&c);
if(b>a)
{
if(b>c)
{
printf("%d is greatest",b);
}
else
{
printf("%d is greatest",c);
}
}
else
{
if(a>c)
{
printf("%d is greatest",a);
}
else
{
printf("%d is greatest",c);
}
}
getch();
}
No comments:
Post a Comment