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, ­am, &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 }