LordKusa

Factorial

Aug 27th, 2019
122
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function factorial(numero:integer):integer;
  2.     var
  3.         I, auxiliar:integer;
  4.        
  5.     begin
  6.    
  7.         auxiliar := 1;
  8.    
  9.         For I := 2 to numero do
  10.             auxiliar := auxiliar * I;
  11.            
  12.         factorial := auxiliar;
  13.        
  14.     end;
RAW Paste Data