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();
}
#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();
}
0 Comments