RosettaCodeData/Task/Factorial/Relation/factorial.relation

11 lines
138 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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