//C program to find Smallest among four numbers using Conditional or ternary operator
#include<stdio.h>
void main()
{
// Variable declaration
int a,b,c,d,small;
printf("Enter four number
");
scanf("%d %d %d %d",&a,&b, &c, &d);
// Smallest among a, b, c and d2
small = ( (a<b && a<c && a<d) ? a : (b<c && b<d) ? b : (c<d)? c : d );
//Display Smallest number
printf("Smallest Number is : %d",small);
}