Find the largest of three numbers
/*WAP to find the
largest of three numbers*/
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter
three numbers:");
scanf("%d%d%d",&a,&b,&c);
if(a>b
&& a>c)
printf("%d
is gretest among them",a);
else if(b>c
&& b>a)
printf("%d
is gretest among them",b);
else
printf("%d
is gretest among them",c);
getch();
}
OUTPUT:
enter three
numbers:333 656 767
767 is gretest
among them
No comments:
Post a Comment