The distance between 5-car and 8-car stop markers

Explanation

The car stop markers for 4- 5- 6- 7- and 8-car train at a certain station are located so that a properly stopped train of any length will be centered in the station. The distance between the 5-car and 8-car stop markers must be 3 car lengths.

The distance between the 5-car and 8-car stop markers must be 3 car lengths. Since the car stop markers are located so that a properly stopped train of any length will be centered in the station, we can assume that each car length takes up an equal amount of space. Therefore, the distance between the 5-car and 8-car stop markers would be equal to the length of 3 cars.

For example, if the length of one car is 10 meters, the distance between the 5-car and 8-car stop markers would be 30 meters.

← Memory a precious gift How to read and store two different variables from a file in c →