P1. (Greater of 3 no.s)
#include#include
void main()
{
int a,b,c;
clrscr();
printf("enter 3 no.s of ur choice");
scanf("%d%d%d",&a,&b,&c);
if(a>b)
{
if(a>c)
{
printf("%d is greater",a);
}
}
if(b>a)
{
if(b>c)
{
printf ("%d is greater",b);
}
}
if(c>a)
{
if(c>b)
{
printf("%d is greater",c);
}
}
getch();
}
No comments:
Post a Comment