luc025.c (659B)
1 /* 2 * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025 3 * Repo: https://github.com/notamitgamer/bsc 4 * License: MIT 5 */ 6 7 /* Write a program to find the greates of the three numbers entered 8 through the keyboard. Use conditional operators. */ 9 /* Let Us C, Chap- 4, Page - 72, Qn No.: E(c) */ 10 11 #include <stdio.h> 12 int main() 13 { 14 double num1, num2, num3, max; 15 printf("Enter three number : "); 16 scanf("%lf %lf %lf", &num1, &num2, &num3); 17 printf("\nGreatest of the three number '%g', '%g' and '%g' is : '%g'", num1, num2, num3, 18 (num1 > num2 && num1 > num3) ? num1 : ((num2 > num1 && num2 > num3) ? num2 : num3)); 19 return 0; 20 }