Canna

Thursday, 27 September 2018

Sections

  • Problem Description

    If the number of seats allowed to a particular branch in engineering exceeds 60, then where will be multiple sections in that branch.

    Given the number of seats allotted to a branch write a C program to determine whether there will be a single section or multiple sections

    Input Format:

    Input consists of 1 integer which corresponds to the number of seats allotted to a branch

    Output format:

    Output consists of string "Single Sections" or "Multiple Section"

    Refer sample input and output for further formatting specifications
  • Test Case 1

    Input (stdin)
    61
    
    
    Expected Output
    Multiple Sections
  • Test Case 2

    Input (stdin)
    60
    
    
    Expected Output
    Single Section
  • Program
  • #include <stdio.h>
    int main()
    {
      int n;
      scanf ("%d",&n);
      if (n>60)
        {
        printf ("Multiple Sections");
        }
      else
        {
        printf ("Single Section");
        }
    
     return 0;
    }

No comments:

Post a Comment

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