Practice · 1 of 5
Recursive factorial
CHALLENGE
Difficulty: beginner+25 XP
Implement int fact(int n) recursively: 0! and 1! are 1; otherwise n * fact(n - 1).
Press Submit to check your solution.
Back to lesson: Practice: Recursion reps
Practice · 1 of 5
Implement int fact(int n) recursively: 0! and 1! are 1; otherwise n * fact(n - 1).
Back to lesson: Practice: Recursion reps