Practice ยท 1 of 1
Named Predicates
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.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Refactor Practice: Structure Recovery