← Control Flow

Switch on Grade

medium

Read a single character grade and print a category, using a switch statement – not an if/else if chain. Both the uppercase and lowercase form of a letter should count: 'A' and 'a' both mean Excellent, 'B' and 'b' both mean Good, and everything else means Needs work.

This is exactly the “stack case labels with no code between them” trick from the lesson, applied on purpose: two labels, one shared block, one break at the end of each group.

Your solution

"Run" uses the sample stdin ("A"). "Submit" checks your code against all 4 test cases.

Test results

Submit your solution to run it against all test cases.

Hints

    Reference solution