#include<stdio.h>
void main()
{
int x,y,z;
printf("Enter values of x, y and z : ");
scanf("%d,%d,%d",&x,&y,&z);
if(x>=y && x>=z)
printf("\n%d is greatest",x);
else if(y>=z)
printf("\n%d is greatest",y);
else
printf("\n%d is greatest",z);
}
#include<stdio.h>
void main()
{
int x,y,z;
printf("Enter values of x, y and z : ");
scanf("%d,%d,%d",&x,&y,&z);
if(x>=y && x>=z)
printf("\n%d is greatest",x);
else if(y>=z)
printf("\n%d is greatest",y);
else
printf("\n%d is greatest",z);
}
Output
Enter values of x, y and z : 4, 9, 2
9 is greatest
0 Comments