E-BOX
BASICS OF C PROGRAMMING
Conditional Statements :- Code Analysis
PROBLEM -16:
LAB SEATING ARRANGEMENT
There are 2 programming labs, each with a seating capacity of 90. There are 240 students with registration numbers from 1 to 240. All 240 students cannot be accomodated in the labs at the same time. It has been decided to conduct theory classes for 60 students every week. It has been planned to conduct theory classes for all students with registration numbers being a multiple of 4. Students with registration numbers from 1 to 120 with registration numbers not a multiple of 4 need to be seated in Programming Lab I and students with registration numbers from 121 to 240 with registration numbers not a multiple of 4 need to be seated in Programming Lab II.
Given the registration number of a student, write a program to specify the lab or hall in which the student needs to be seated.
Input Format:
Input consists of 1 integer which corresponds to the registration number of the student.
Output Format:
Output consists of the string “Lab 1” or “Lab 2” or “Theory Session”.
Refer sample input and output for further formatting specifications.
Sample Input and Output:
[All text in bold corresponds to input and the rest corresponds to output]
Enter the registration number of the student
3
Lab 1
SOLUTION :
No comments:
Post a Comment