Advertisement
LOVEGUN

Function Factorielle

Mar 6th, 2021
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.17 KB | None | 0 0
  1. Function facto (n:Longint): Longint;
  2. Var
  3.   x,i: longint;
  4. Begin
  5.     //max value of n=12
  6.   x := 1;
  7.   For i:=1 To n Do
  8.         begin
  9.         x := x*i;
  10.         end;
  11.   facto := x;
  12. End;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement