Practice · 1 of 1
Named Predicates
CHALLENGE
Difficulty: beginner+25 XP
Refactor logic into named helpers: is_adult(int age) (>= 18), has_id(const std::string& id) (non-empty), and can_enter(int age, const std::string& id) using both.
Press Submit to check your solution.
Back to lesson: Practice: Refactor Practice: Structure Recovery