bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

root / semester_1 / letusc / luc025.c

luc025.c (523B)


      1 /* Write a program to find the greates of the three numbers entered
      2 through the keyboard. Use conditional operators. */
      3 /* Let Us C, Chap- 4, Page - 72, Qn No.: E(c) */
      4 
      5 #include <stdio.h>
      6 int main()
      7 {
      8     double num1, num2, num3, max;
      9     printf("Enter three number : ");
     10     scanf("%lf %lf %lf", &num1, &num2, &num3);
     11     printf("\nGreatest of the three number '%g', '%g' and '%g' is : '%g'", num1, num2, num3, 
     12         (num1 > num2 && num1 > num3) ? num1 : ((num2 > num1 && num2 > num3) ? num2 : num3));
     13     return 0;
     14 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror