📅  最后修改于: 2022-03-11 14:44:50.195000             🧑  作者: Mango
// Ex.14 A C Program to find greatest of 3 numbers (nested-if)
#include
#include
void main()
{
int x,y,z;
clrscr();
printf("Enter three values\n");
scanf("%d%d%d",&x,&y,&z);
if(x>y)
{
if(x>z)
printf("%d is greater",x);
}
else if(y>z)
printf("%d is greater",y);
else
printf("%d is greater",z);
getch();
}