8 lines
141 B
Text
8 lines
141 B
Text
global function factorial(integer n)
|
|
atom res = 1
|
|
while n>1 do
|
|
res *= n
|
|
n -= 1
|
|
end while
|
|
return res
|
|
end function
|