One-dimensional cellular automata: Difference between revisions

Content added Content deleted
m (→‎{{header|PureBasic}}: beautify code and Output)
m (→‎{{header|PureBasic}}: The output is now as in the other languages)
Line 1,160:
Print("Generation "+Str(Gen)+": ")
For n=1 To 20
Print(Chr(95-cG(n)*3+3260))
Next
Gen +1
Line 1,175:
 
PrintN("Press any key to exit"): Repeat: Until Inkey() <> ""</lang>Output:
<pre>Generation 0: _### _## _# _# _# _# __#__
Generation 1: _# _##### _# _# _#______
Generation 2: __## ___## _# _#_______
Generation 3: __## ___### _#________
Generation 4: __## ___# _##_________
Generation 5: __## ____###_________
Generation 6: __## ____# _#_________
Generation 7: __## _____#__________
Generation 8: __##________________
Generation 9: __##________________</pre>
Press any key to exit</pre>
 
=={{header|Python}}==