Factorial (Recursion)

Write a recursive factorial(n) and print n!.

Input: One integer 0 ≤ n ≤ 20.

Output: n factorial.

Difficulty: Easy. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.

Hint

  • 0! is 1.

More Recursion practice