C Program to find biggest of three numbers using Conditional Operator
Program
#include<stdio.h>
void main()
{
int a, b, c;
printf("Enter three numbers\n");
scanf("%d %d %d", &a, &b, &c);
((a > b) && (a > c)) ? printf("a is biggest\n") :
(b > c) ? printf("b is biggest\n") :
printf("c is biggest\n");
}
Output 1
Enter three numbers
71
65
9
a is biggest
Output 2
Enter three numbers
43
70
34
b is biggest
Output 3
Enter three numbers
10
14
50
c is biggest