Factorial in Baltie
Example for versions
Baltie 3
This example uses iterative factorial definition. While
loop takes a condition as parameter in round brackets. Variable out
contains the output of the example. The only tricky thing is outputting multi-line variable: to do this, one had to move the sprite to the top of the screen, so that the output isn’t truncated by the lower side of the screen. 13! overflows.
Factorial in Baltie 3
Factorial in Baltie 3 (result)
Comments
]]>blog comments powered by Disqus
]]>