Quote:
I am trying to code this question but am not really sure as to how
There is an easy way to get that knowledge, just give it a try and see which part works and which one don't, then elaborate. This is trial and error learning.
As programmer, your job is to create solutions to your problems.
Advice: Learn one or more analyze methods, E.W. Djikstra/N. Wirth
Stepwize Refinement/top-Down method is a good start.
Structured Programming.pdf[
^]
https://en.wikipedia.org/wiki/Top-down_and_bottom-up_design[
^]
https://en.wikipedia.org/wiki/Structured_programming[
^]
https://en.wikipedia.org/wiki/Edsger_W._Dijkstra[
^]
https://www.cs.utexas.edu/users/EWD/ewd03xx/EWD316.PDF[
^]
When you have a big problem, split it in a few smaller/easier problems, once each little problem is solved, the big one is solved too.
- Reading input will probably be the first step.
- Playing Game of Life in middle.
- giving result the last step.
So far, you show no work and didn't stated a question.