Practice · 1 of 4
Traffic Light Cycle
CHALLENGE
Difficulty: beginner+25 XP
Given typedef enum { RED, YELLOW, GREEN } Light; in scope, implement Light next_light(Light l) cycling RED -> GREEN -> YELLOW -> RED.
Press Submit to check your solution.
Back to lesson: Practice: Enum Practice