commit 0bc4ba3b48ac4e4b8c804092b4f5d56025e95f58
parent 4875114864dfeefbdf6b2b7fbefa574422c763b9
Author: Amit Dutta <amitdutta4255@gmail.com>
Date: Mon, 6 Oct 2025 12:04:42 +0530
new luc025
Diffstat:
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/letusc/luc025.c b/letusc/luc025.c
@@ -0,0 +1,15 @@
+/* Write a program to find the greates of the three numbers entered
+through the keyboard. Use conditional operators. */
+/* Author - Amit Dutta, Date - 6th OCT, 2025 */
+/* Let Us C, Chap- 4, Page - 72, Qn No.: E(c) */
+
+#include <stdio.h>
+int main()
+{
+ double num1, num2, num3, max;
+ printf("Enter three number : ");
+ scanf("%lf %lf %lf", &num1, &num2, &num3);
+ printf("\nGreatest of the three number '%g', '%g' and '%g' is : '%g'", num1, num2, num3,
+ (num1 > num2 && num1 > num3) ? num1 : ((num2 > num1 && num2 > num3) ? num2 : num3));
+ return 0;
+}+
\ No newline at end of file