PHP
A factorial of any given integer,n, is the product of all positive integers between 1 andninclusive.
So the factorial of 4 is 1 × 2 × 3 × 4 = 24, and the factorial of 5 is 1 × 2 × 3 × 4 × 5 = 120. This
can be expressed recursively as follows:
❑ Ifn== 0, return 1. (This is the base case)
❑ Ifn> 0, multiply numbers from n down to 1.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here