you see a train coming and you see 1 yellow box car and followed by 2 blue box cars on the 99th and 100th be ? both blue 1 yellow 1 blue so what will the 99 and 100th color of the box cars be
-
If the pattern repeats every three cars, then:
- if the position of the car divided by three has a remainder of 1, the car is yellow
- if the position of the car divided by three has a remainder of 2, the car is blue
- if the position of the car is evenly divisible by three, the car is blue
99 is evenly divisible by three, so the 99th car is blue
100 has a remainder of 1 when divisible by three, so the 100th car is yellow
- if the position of the car divided by three has a remainder of 1, the car is yellow
- if the position of the car divided by three has a remainder of 2, the car is blue
- if the position of the car is evenly divisible by three, the car is blue
99 is evenly divisible by three, so the 99th car is blue
100 has a remainder of 1 when divisible by three, so the 100th car is yellow