Write a c program to check out the maximum number(conditional operator)

Check out the maximum number Using Conditional Operator

#include<stdio.h>
#include<conio.h>
main()
{
int x,y,z,max;
printf("please enter the three number");
scanf("%d%d%d",&x,&y,&z);
max=x>y?x>z?x:z : y>z?y:z;
printf("the number is maximum");
getch();
}

Post a Comment

0 Comments