Task 2 of 7 · 0 solved · 7 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

11.2 Switch expressions — score to letter grade

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Fill in grade using a switch expression so that it returns a letter: 5 → "A", 4 → "B", 3 → "C", anything else "F".

Use arrow labels and a default — for an int switch it is required. The program prints A, C, F.

Your solution