RosettaCodeData/Task/Factorial/DWScript/factorial-2.dw

7 lines
141 B
Text
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
function RecursiveFactorial(n : Integer) : Integer;
begin
if n>1 then
Result := RecursiveFactorial(n-1)*n
else Result := 1;
end;