One-dimensional cellular automata: Difference between revisions

→‎{{header|PureBasic}}: Updated code to PureBasic v5.41 LTS
(→‎{{header|PureBasic}}: Updated code to PureBasic v5.41 LTS)
Line 3,204:
Dim nG.i(21)
Define.i n, Gen
 
DataSection
Data.i 0,1,1,1,0,1,1,0,1,0,1,0,1,0,1,0,0,1,0,0
Line 3,211:
Read.i cG(n)
Next
 
OpenConsole()
Repeat
Line 3,227:
EndIf
Next
Swap cGCopyArray(nG() , nGcG())
Until Gen > 9
 
PrintN("Press any key to exit"): Repeat: Until Inkey() <> ""</lang>
{{out}}
Anonymous user