Validated Parsing
Challenge on lesson: Checkpoint: Robustness
CHALLENGE
Difficulty: beginner+25 XP
Implement parse_percent(text) returning the percentage as a double in [0, 100]: throw std::invalid_argument for non-numeric text, std::out_of_range for numbers outside the range. Valid values return normally.
Press Submit to check your solution.
Back to lesson: Checkpoint: Robustness