The train passengers enter the station they want to go to, and the app tells them the nearest trains.
Define variables such as: leave, platform, arrive, and station.
The variables will change according to the destination of The passenger.
Please note, the train has 50 passengers, So Use a nested loop.
The nearest trains:
station A, leaves 14:05, platform 3, arrives 16:15
station A, leaves 14:09, platform 2, arrives 15:39
station A, leaves 14:35, platform 3, arrives 16:45
station B, leaves 14:51, platform 1, arrives 17:01
station c, leaves 14:05, platform 3, arrives 14:22
station C, leaves 14:35, platform 3, arrives 14:52
station D, leaves 14:16, platform 1, arrives 15:31
Define variables such as: leave, platform, arrive, and station.
The variables will change according to the destination of The passenger.
Please note, the train has 50 passengers, So Use a nested loop.
The nearest trains:
station A, leaves 14:05, platform 3, arrives 16:15
station A, leaves 14:09, platform 2, arrives 15:39
station A, leaves 14:35, platform 3, arrives 16:45
station B, leaves 14:51, platform 1, arrives 17:01
station c, leaves 14:05, platform 3, arrives 14:22
station C, leaves 14:35, platform 3, arrives 14:52
station D, leaves 14:16, platform 1, arrives 15:31