One-dimensional cellular automata: Difference between revisions

Content deleted Content added
m fix bare lang tags
Line 353:
do { printf(c + 1); } while (evolve(c + 1, b + 1, sizeof(c) - 3));
return 0;
}</lang>output<lang>###_##_#_#_#_#__#__
<pre>###_##_#_#_#_#__#__
#_#####_#_#_#______
_##___##_#_#_______
Line 361 ⟶ 362:
_##____#_#_________
_##_____#__________
_##________________</langpre>
 
Similar to above, but without a backup string:
Line 743 ⟶ 744:
MAIN: main-cellular
</lang>
<langpre>( scratchpad ) "cellular" run
_###_##_#_#_#_#__#__
_#_#####_#_#_#______
Line 754 ⟶ 755:
__##________________
__##________________
__##________________</langpre>
 
=={{header|Fantom}}==
Line 1,648 ⟶ 1,649:
Output:
 
<langpre>_###_##_#_#_#_#__#__
_#_#####_#_#_#______
__##___##_#_#_______
Line 1,656 ⟶ 1,657:
__##____#_#_________
__##_____#__________
__##________________</langpre>
 
=={{header|PicoLisp}}==
Line 2,035 ⟶ 2,036:
(display-evolution (list 1 1 1 0 1 1 0 1 0 1 0 1 0 1 0 0 1 0) 10)</lang>
Output:
<langpre>(1 1 1 0 1 1 0 1 0 1 0 1 0 1 0 0 1 0)
(1 0 1 1 1 1 1 0 1 0 1 0 1 0 0 0 0 0)
(0 1 1 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0)
Line 2,044 ⟶ 2,045:
(0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0)
(0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
(0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)</langpre>
 
=={{header|Seed7}}==