- Assign random values to each matrix element (0-dead, 1-alive)
- Change the state of each element using its current state and the states of its 8 neighbours:
- if there are 5 or more 1s, change its state to alive
- otherwise change its state to dead
- Repeat (2) at least 10 times and observe the changes in the matrix.
gcc-7 -fopenmp -o main main.c
./main
This project was developed to be a parallel programming example with OpenMP.