17 lines
298 B
Text
17 lines
298 B
Text
for i = 1000 to 1016
|
|
print i;" = "; factorial$(i)
|
|
next
|
|
wait
|
|
function factorial$(num)
|
|
if num = 1 then factorial$ = "1"
|
|
fct = 2
|
|
while fct <= num
|
|
if (num mod fct) = 0 then
|
|
factorial$ = factorial$ ; x$ ; fct
|
|
x$ = " x "
|
|
num = num / fct
|
|
else
|
|
fct = fct + 1
|
|
end if
|
|
wend
|
|
end function
|