Canna

Thursday, 27 September 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
  • Test Case 1

    Input (stdin)
    1 2 3 4
    
    
    Expected Output
    1
  • Test Case 2

    Input (stdin)
    5 6 7 8
    
    
    Expected Output
    5
  • Program
  • #include <stdio.h>
    int main()
    {
      int a,b,c,d;
      scanf("%d%d%d%d",&a,&b,&c,&d);
      printf("%d",a);
    
     return 0;
    }

No comments:

Post a Comment

Note: only a member of this blog may post a comment.