bsc

Comprehensive codebase and coursework for the 4-year B.Sc. Computer Science Honours degree (WBSU)

git clone https://github.com/notamitgamer/bsc.git
· rebuilt hourlyOpen on GitHub
root / semester_1 / tuition-c / P022.c

P022.c (478B)


      1 /* WAP to find out smallest of three numbers without using if_else block. */
      2 // This code has not been compiled. 
      3 // If you find any issues, please create a new issue on GitHub regarding them.
      4 
      5 #include <stdio.h>
      6 int main()
      7 {
      8     int a, b, c, min;
      9     printf("Enter three number : ");
     10     scanf("%d %d %d", &a, &b, &c);
     11     min = (a < b && a < c) ? a : (b < a && b < c) ? b
     12                                                   : c;
     13     printf("Minimum = %d", min);
     14     return 0;
     15 }