Anonymous user
Conway's Game of Life: Difference between revisions
m
→{{header|COBOL}}: Syntax highlighting.
imported>Arakov |
imported>Acediast m (→{{header|COBOL}}: Syntax highlighting.) |
||
Line 4,494:
=={{header|COBOL}}==
<syntaxhighlight lang="
program-id. game-of-life-program.
data division.
working-storage section.
Line 4,514 ⟶ 4,515:
05 check-row pic s9.
05 check-cell pic s9.
procedure division.
control-paragraph.
Line 4,562 ⟶ 4,564:
if cell(neighbour-row,neighbour-cell) is equal to '#',
and check-cell is not equal to zero or check-row is not equal to zero,
then add 1 to living-neighbours.
end program game-of-life-program.</syntaxhighlight>
{{out}}
<pre>GENERATION 0:
|