Saturday, August 18, 2018

SEMESTER HOLIDAYS


  • Problem Description

    Normally in all engineering colleges, there will be long vacation after every even semester and a short vacation after every odd semester.

    Input format:

    Input consists of 1 integers which corresponds to the current semester of the students (i.e) Even semester " Long Vacation" 
    ODD semester "Short Vacation" determine by dividing(modulo) with 2

    Output format:

    Output consists of the string "Long Vacation " or "Short Vacation".

    Refer sample input and output for further formatting specifications.
  • CODING ARENA
  • #include <stdio.h>
    int main()
    {
      int n;
      scanf("%d",&n);
      if(n%2==0)
        printf("Long Vacation");
      else 
        printf("Short Vacation");
     

    return 0;
    }
  • Test Case 1

    Input (stdin)
    6
    
    
    Expected Output
    Long Vacation
  • Test Case 2

    Input (stdin)
    3
    
    
    Expected Output
    Short Vacation

No comments:

Post a Comment