You are on page 1of 1

factorial(0,

factorial(1,
factorial(2,
factorial(N,

1).
1).
2).
F) :- N > 2,N1 is N - 1, factorial(N1, F1),F is N * F1.

You might also like