28 lines
283 B
Text
28 lines
283 B
Text
'accurate between 1-12
|
|
|
|
print "version 1 without function"
|
|
|
|
for i = 1 to 12
|
|
|
|
let n = i
|
|
let f = 1
|
|
|
|
do
|
|
|
|
let f = f * n
|
|
let n = n - 1
|
|
|
|
loop n > 0
|
|
|
|
print f, " ",
|
|
wait
|
|
|
|
next i
|
|
|
|
print newline, newline, "version 2 with function"
|
|
|
|
for i = 1 to 12
|
|
|
|
print factorial(i), " ",
|
|
|
|
next i
|