0
6.2kviews
Write a program to find the biggest of given 3 no's using conditional operator.
1 Answer
written 8.3 years ago by |
Algorithm:
Program Code:
#include<stdio.h>
int main() {
int a,b,c,big;
printf("\nEnter 3 numbers:");
scanf("%d %d %d", &a, &b, &c);
big=(a>b && a>c? a:b>c? b:c);
printf("\nThe biggest number is:%d", big);
return 0;
}
Output:
Enter 3 numbers: 10 30 20
The biggest number is: 30