Factorial Delphi Function


function Fact(inbr:integer):integer;
begin
  if inbr < 1 then Result := 1
  else Result := inbr * Fact(inbr-1) ;
end;

No comments:

Post a Comment