Program C untuk menemukan minimal 5 angka menggunakan operator bersyarat di C

//C program to find Smallest among five numbers using ternary operator

#include<stdio.h>

void main()
{
  // Variable declaration
   int a,b,c,d,e,small;

   printf("Enter five number\n");
   scanf("%d %d %d %d %d",&a,&b, &c, &d, &e);

 // Smallest among a, b, c and d
   small = ( (a<b && a<c && a<d && a<e) ? a : (b<c && b<d && b<e) ? b : (c<d && c<e)? c : (d<e)? d : e );

 //Display Smallest number
   printf("Smallest Number is : %d",small);

}
MayankARC