- WAP to find the greatest of 3 numbers
#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 greatest",a) ;
else if(b>a&&b>c)
printf("%d is greatest",b);
else
printf("%d is greater",c);
getch();
}
No comments:
Post a Comment