So, Let's get to the point. I need some hint for the algorithm for my project.
One monster will attack earth. It doesn't need army because the monster can duplicate itself.
The monster divided into 2 kinds, BLACK monster and WHITE monster.
BLACK MONSTER divided itself into BLACK monster and WHITE monster.
WHITE MONSTER divided itself into BLACK monster and 2 WHITE monster each day.
At the invasion day (Day-0) only the BLACK monster come.
I must make the program that count the amount BLACK monster, WHITE monster, and total both of them at n-day.
The example of output is like this:
Input days: 2 output example: Days -0 ================================ BLACK monster 0 <> into BLACK monster 1 BLACK monster 0 <> into WHITE monster 1 Days -1 ================================ BLACK monster 1 <> into BLACK monster 1 BLACK monster 1 <> into WHITE monster 1 WHITE monster 1 <> into BLACK monster 2 WHITE monster 1 <> into WHITE monster 2 WHITE monster 1 <> into WHITE monster 3 Days -2 ================================ BLACK monster 1 <> into BLACK monster 1 BLACK monster 1 <> into WHITE monster 1 WHITE monster 1 <> into BLACK monster 2 WHITE monster 1 <> into WHITE monster 2 WHITE monster 1 <> into WHITE monster 3 BLACK monster 2 <> into BLACK monster 3 BLACK monster 2 <> into WHITE monster 4 WHITE monster 2 <> into BLACK monster 5 WHITE monster 2 <> into WHITE monster 5 WHITE monster 2 <> into WHITE monster 6 WHITE monster 3 <> into BLACK monster 5 WHITE monster 3 <> into WHITE monster 7 WHITE monster 3 <> into WHITE monster 8 Total ================================ BLACK monster: 5 WHITE monster: 8 TOTAL: 13
Anyone can help me to make this program? I hope you can guide me step-by-step to complete this
I really appreciate that.
Sorry my english isn't good enough