Problem Description
Leena is studying 12th standard. She tries to do one unique program using operators. So she plan to write one c program to find smallest among four number using ternary operatorCODING ARENA
#include <stdio.h>
int main()
{
int a,b,c,d;
scanf("%d%d%d%d",&a,&b,&c,&d);
if(a<b&&a<c&&a<d)
printf("%d",a);
return 0;
}
Test Case 1
Input (stdin)1 2 3 4
Expected Output1
Test Case 2
Input (stdin)5 6 7 8
Expected Output5
No comments:
Post a Comment