bsc

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

luc011.c (879B)


      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 /* If ages of Ram, Shyam and Ajay are input through the keyboard,
      8 write a program to determine the youngest of the three. */
      9 /* Let Us C, Chap- 3, Page - 53, Qn No.: f(b) */
     10 
     11 #include <stdio.h>
     12 int main()
     13 {
     14     int ram, shyam, ajay;
     15     printf("Please enter the age of Ram, Shyam and Ajay : ");
     16     scanf("%d %d %d", &ram, &shyam, &ajay);
     17     if (ram == shyam || ram == ajay || shyam == ajay)
     18         printf("\nThree must have different age.");
     19     if (ram < shyam && ram < ajay)
     20         printf("\nRam is the youngest. Age : %d", ram);
     21     if (shyam < ram && shyam < ajay)
     22         printf("\nShyam is the youngest. Age : %d", shyam);
     23     if (ajay < ram && ajay < shyam)
     24         printf("\nAjay is the youngest. Age : %d", ajay);
     25     return 0;
     26 }
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror