Galton box animation: Difference between revisions

Content added Content deleted
(→‎{{header|C}}: obligatory screenshot)
Line 101: Line 101:
StringTrimRight, out, out, 1 ; removes the last newline
StringTrimRight, out, out, 1 ; removes the last newline
return out
return out
}</lang>While the number of pegs, and falling space are configurable, here's output shortly after starting one configuration:
}</lang>
<pre>
*
* *O
* * *
* * * *
* * * * *
* * * * * *
O
O O
O O O O
O O O O O
=============</pre>

=={{header|C}}==
=={{header|C}}==
<lang c>#include <stdio.h>
<lang c>#include <stdio.h>