Saved Bookmarks
| 1. |
Write a c program to find largest among three numbers using conditional operator |
|
Answer» Explanation: In this PROGRAM we have used the conditional OPERATOR for COMPARING biggest of three numbers.# include void main() { int a, B, c, big ; printf("Enter three numbers : ") ; scanf("%d %d %d", &a, &b, &c) ; big = a > b ? ( a > c ? a : c) : (b > c ? b : c) ; printf("\nThe biggest number is : %d", big) ; |
|