hard
Debug Logic Errors
Identify logical issues in code and suggest fixes.
📝 Promptens innehåll
Here is a code snippet intended to calculate the factorial of a number. It currently produces incorrect results for inputs greater than 5. Identify the logical errors, explain why they occur, and provide the corrected code. Code: [Paste Code Here]