Question: Write a switch statement that tests the value of a character variable called grade. Depending on the value of grade a message should be displayed

 Write a switch statement that tests the value of a character

Write a switch statement that tests the value of a character variable called grade. Depending on the value of grade a message should be displayed as shown in the table below. If none of the listed values are matched the text, Unknown grade should be displayed. Grade A or 'a' 'B' or 'b' 'C' or 'C' 'D' or 'd' 'F' or 'f Message Excellent Good "Okay" Below average Fail

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!