Question: program in c. Please write comments so I could understand the code. Thank you. Write a recursive function that computes the factorial of a number.
program in c. Please write comments so I could understand the code. Thank you.
Write a recursive function that computes the factorial of a number. The factorial of a number n is the product 1.2.3.4...n of the first n positive integers. The function prototype is int factorial(int n). The function computes the factorial of n and returns it. The function must be recursive and loops should not be used.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
