Question: 2. Write a program to determine the letter grade for a student based on the totals marks the student received. Your program should prompt the

2. Write a program to determine the letter grade for a student based on the totals marks the student received. Your program should prompt the student to enter the marks received, then read the marks and display the marks on the screen (e.g, You entered). Next, use the if, else if selection structure to determine the letter grade for a student based on the following criteria: Student Marks Letter Grade Marks greater than or equal to 80 Marks greater than or equal to 70 Marks less than 60 Your program should then output the letter grade of the student 3. Rewrite the program in Q2, using the switch structure instead of the if, else if selection format Hint: Recl that switch uses int/char type labels. Range of marks can be converted to an int value by diving by 10. Example for marks in the range of 70 to 79 (70 marks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
