Problem Description

Calculate factorial using recursive function (5! = 5×4×3×2×1)
Real Life: Understanding how functions can call themselves.

Step-by-Step Logic:
1. Base case: if n is 0 or 1, return 1
2. Recursive case: return n × factorial(n-1)
3. Function keeps calling itself with smaller values
4. Returns when base case reached

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next