Accept two numbers X and Y as input. The program must print the smaller of two numbers as the output using ternary operaor.
Example Input/Output:
Input:
30 90
Output:
30
#include<stdio.h>
#include <stdlib.h>
int main()
{
int X, Y;
scanf("%d %d",&X,&Y);
printf("%d", (X<Y)?X:Y);
return 0;
}


Leave a Reply