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
<pre>###_##_#_#_#_#__#__
#_#####_#_#_#______
_##___##_#_#_______
Line 361 ⟶ 362:
_##____#_#_________
_##_____#__________
_##________________</
Similar to above, but without a backup string:
Line 743 ⟶ 744:
MAIN: main-cellular
</lang>
<
_###_##_#_#_#_#__#__
_#_#####_#_#_#______
Line 754 ⟶ 755:
__##________________
__##________________
__##________________</
=={{header|Fantom}}==
Line 1,648 ⟶ 1,649:
Output:
<
_#_#####_#_#_#______
__##___##_#_#_______
Line 1,656 ⟶ 1,657:
__##____#_#_________
__##_____#__________
__##________________</
=={{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:
<
(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)</
=={{header|Seed7}}==
|