9 lines
119 B
Text
9 lines
119 B
Text
function factorial(integer n)
|
|
atom f = 1
|
|
while n > 1 do
|
|
f *= n
|
|
n -= 1
|
|
end while
|
|
|
|
return f
|
|
end function
|