← Unit 2 · all exercises
Saved in this browser only

Letter grade

Return the letter grade for a score: 90 and above is "A", 80 and above is "B", 70 and above is "C", 60 and above is "D", and anything less is "F".

String letter(int score)

Solution.java
Loading editor…
Results

Examples

  • letter(95) → A
  • letter(72) → C

There are also 5 hidden tests you can't see. Solve the problem, not the examples.