CubeScript examples for reference.xml
#7
Will this sort of thing do?
[cubescript]
fizzbuzz = [ loop i 101 [
if (&& (= (mod $i 3) 0) (= (mod $i 5) 0)) [
echo "FizzBuzz" ] [
if (= (mod $i 3) 0) [
echo "Fizz" ] [
if (= (mod $i 5) 0) [
echo "Buzz" ] [
echo $i ]
]
]
]
]
[/cubescript]
Looking at this now, I have no idea why I did it this way.
Ah, yeah, this is echo, not printf. Newlines 'n' shiz.
Thanks given by:


Messages In This Thread
RE: CubeScript examples for reference.xml - by Frogulis - 20 Oct 12, 02:29PM