bsc

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

APC-PRAC-012.c (634B)


      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 input three integer and find out second largest */
      8 
      9 #include <stdio.h>
     10 
     11 int main()
     12 {
     13     int a, b, c, secondLargest;
     14     printf("Enter three number : ");
     15     scanf("%d %d %d", &a, &b, &c);
     16     if ((a < b && a > c) || (a > b && a < c))
     17         secondLargest = a;
     18     if ((b < a && b > c) || (b > a && b < c))
     19         secondLargest = b;
     20     if ((c < b && c > a) || (c > b && c < a))
     21         secondLargest = c;
     22     printf("\nSecond Largest : %d", secondLargest);
     23     return 0;
     24 }
© 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