One-dimensional cellular automata: Difference between revisions
Content added Content deleted
Line 377: | Line 377: | ||
9: . . @ @ . . . . . . . . . . . . . . . . |
9: . . @ @ . . . . . . . . . . . . . . . . |
||
<lang awk> |
|||
Another new solution (twice size as previous solution) : |
Another new solution (twice size as previous solution) : |
||
#!/usr/local/bin/gawk -f |
#!/usr/local/bin/gawk -f |
||
Line 418: | Line 419: | ||
} while (str_ != str_previous) |
} while (str_ != str_previous) |
||
} |
} |
||
⚫ | |||
{{out}} |
|||
then : |
|||
<pre> |
|||
$ echo ".@@@.@@.@.@.@.@..@.." | awk -f automata.awk |
$ echo ".@@@.@@.@.@.@.@..@.." | awk -f automata.awk |
||
0: .@@@.@@.@.@.@.@..@.. |
0: .@@@.@@.@.@.@.@..@.. |
||
Line 431: | Line 434: | ||
8: __@@________________ |
8: __@@________________ |
||
9: __@@________________ |
9: __@@________________ |
||
⚫ | |||
=={{header|BASIC}}== |
=={{header|BASIC}}== |