Function/Variable Scope   «Prev 

Course project output routine

Objective:Write a display routine for the life simulation course project.

Instructions

The life simulation will be played on a 10 by 10 "life board." Each cell of the board will either be empty or "alive."
Create a two-dimensional array for the board. Use this array to store information and to display the board.
Since you have not developed the game yet, you can initialize the board with random X's or 1's to indicate a cell that is alive.
You can easily do this when you display the board by checking rand() modulus 2. If this equals 1, then display an X in the cell. If rand() modulus 2 equals 0, then do not display an X.
Be sure to use function prototypes in your code.
Run your program several times and make sure the board content is being initialized differently each time.
Paste the source code of your program below and click the Submit button when you are ready to submit this exercise.