Professional Documents
Culture Documents
SUMMATIVE
6
SELECTION STRUCTURES
III.PROCEDURE:
1. Get three exam grades from the user and compute the average of the grades. Output the
average of the three exams. Together with the average, also include a smiley face in the
output if the average is greater than or equal to 60, otherwise output :-(.
2. Write a C program that will read in month and day (as numerical value). The program will
return the equivalent zodiac sign.
Sample output:
Enter month: 6
Enter day: 25
Zodiac sign for June 25 is Cancer
3. Write a switch statement that assigns to the variable lumens the expected brightness of a
standard light bulb whose wattage has been stored in watts.
2. For you, which is is preferably the most convenient control structure to be used in
comparisons, IF-ELSE or SWITCH?
I will choose the “IF – ELSE” control structure since this is much simpler than the latter.
Note: The following rubrics/metrics will be used to grade students’ output in the Lab
Summative 5.