RosettaCodeData/Task/Factorial/Relation/factorial.relation
2023-07-01 13:44:08 -04:00

10 lines
138 B
Text

function factorial (n)
set result = 1
if n > 1
set k = 2
while k <= n
set result = result * k
set k = k + 1
end while
end if
end function