Each robot collects materials for two (2) months. During this time it has collected enough materials to build three (3) robots. It takes one month to build a robot. As soon as it is built (and running) it starts collecting materials to build robots its self.
Write a program that computes the number of robots and keeps track of what they are doing each month. Stop collecting new material for robots when you have 200 robots. This means that some robots will move directly from being built to being idle. So if the total number of robots at the end of one month exceeds 200, no robots should start collecting the following month. If a robot had started collecting material, let the robot complete its cycle. Start with one robot.
Make sure that your program runs until all of the robots are idle. Mark your output with: