Thursday, September 13, 2018

LEENAS CLASSROOM


  • 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 operator
  • CODING 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 Output
    1
  • Test Case 2

    Input (stdin)
    5 6 7 8
    
    
    Expected Output
    5

No comments:

Post a Comment