Implement function factorial
factorial(3); // 3 * 2 * 1 = 6
factorial(5); // 5 * 4 * 3 * 2 * 1 = 120
factorial(0); // 1
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
Implement function factorial
factorial(3); // 3 * 2 * 1 = 6
factorial(5); // 5 * 4 * 3 * 2 * 1 = 120
factorial(0); // 1