Skip to main content

Practice · 1 of 4

Letter grades with boundaries

CHALLENGE
Difficulty: beginner+25 XP

Implement char letterGrade(int score): 'A' for 90+, 'B' for 80–89, 'C' for 70–79, 'F' otherwise. Order the chain so the boundaries land correctly.

Back to lesson: Practice: Branch and bound