Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

MAT09 – FUNDAMENTALS OF COMPUTING I

GRADED GROUP RECITATION


November 11, 2021

PROBLEM #1
Create a NESTED-IF-ELSE C program for analysis of people of certain age groups who are
eligible for getting a suitable job if their condition and norms get satisfied using nested if
statement. If the age of the applicant is below 18 output “Not eligible for work because he/she
is a minor”. If the age is greater than or equal to 18 and less than equal to 50, output “Eligible
for the work”. Else, output “Age is not satisfactory according to company norms”. (hint: you can
use the operator && for the AND conditional operator)

PROBLEM #2
Create a NESTED-IF-ELSE C program that will enable the user to input a score and determine
the following:
1. If score>75, output “First Class”
2. If score>65, output “Second Class”
3. If score=>55, output “Third Class”
4. Else, output “Fourth Class”

PROBLEM #3
Create a NESTED-IF-ELSE C program that will enable the user to input 2 numbers and output
the following:
1. If no1 = no2, output “Result: 12 = 12” (sample input: no1 = 12 & no2 = 12)
2. If no1 > no2, output “Result: 24 > 11” (sample input: no1 = 24 & no2 = 11)
3. If no1 < no2, output “Result: 44 < 66” (sample input: no1 = 44 & no2 = 66)

PROBLEM #4
Create a NESTED-IF-ELSE C program that will enable the user to input a number and satisfy the
following:

condition output

rating < 5000 "mild"

rating < 20000 "medium"

rating < 70000 "hot"

rating >= 70000 "extreme"


PROBLEM #5
Using SWITCH-CASE, create a C program that will enable the user to input a single-character
input and satisfy the following:
1. Input ‘A’, output “Excellent”
2. Input ‘B’, output “Very Good”
3. Input ‘C’, output “Good”
4. Input ‘D’, output “Low Passed”
5. Other input, output “Invalid Grade”

PROBLEM #6
Using SWITCH-CASE, create a C program that will enable the user to input any integer and also
ask the user to select 2, 4, 6 or 8. The program must satisfy the following:
1. If the user selected 2, add 10 to the input integer
2. If the user selected 4, add 100 to the input integer
3. If the user selected 6, add 1000 to the input integer
4. If the user selected 8, add 10000 to the input integer
5. Other input, output “Invalid Selection”

PROBLEM #7
Using SWITCH-CASE, create a C program that will enable the user to input his/her name and
the combo meal that the user wanted to order (combo meal selection if from 1-4). The program
should satisfy the following: (sample input name is “Mabeth”)
1. If user selected combo meal 1, output “Hi Mabeth! You ordered burger and fries.
Thanks!”
2. If user selected combo meal 2, output “Hi Mabeth! You ordered hotdog sandwich and
fries. Thanks!”
3. If user selected combo meal 3, output “Hi Mabeth! You ordered 1-pc fried chicken and
rice. Thanks!”
4. If user selected combo meal 4, output “Hi Mabeth! You ordered spaghetti and burger.
Thanks!”
5. Other input, output “Invalid Combo Meal”

You might also like