Practice · 3 of 5
Hidden conditions in a story
CHALLENGE
Difficulty: intermediate+25 XP
A train ticket costs a **flat 400** when start and end stations are in the **same zone**; otherwise **200 per zone crossed** (absolute difference between zone numbers). Implement fee(int start, int end, int zone) where start/end are the zones of the boarding and exit stations. Careful: the parameters are already zones — do not invent extra mapping.
Press Submit to check your solution.
Back to lesson: Practice: Reading specs like the exam writes them