//Greatest of 3 nos using logical operator
#include <stdio.h>
int main()
{
int a,b,c;
printf("Enter 3 numbers : \n");
scanf("%d%d%d", &a, &b, &c);
if(a>b&&a>c)
{
printf("A is Greatest number ");
}
else if(b>c)
{
printf("\n B is Greatest number ");
}
else
{
printf("\n C is Greatest number ");
}
return 0;
}
Comments
Post a Comment