computer programs to print ternary operator
Answers
Answered by
3
#include
#include
void main()
{
int x = 5, y = 10;
printf("Max of %d and %d is: %d\n", x, y, (x>y? x: y));
getch();
}
OUTPUT:
Max of 5 and 10 is: 10
#include
void main()
{
int x = 5, y = 10;
printf("Max of %d and %d is: %d\n", x, y, (x>y? x: y));
getch();
}
OUTPUT:
Max of 5 and 10 is: 10
Similar questions