Saturday, January 5, 2019

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

0 comments:

Post a Comment