Q.

Which of the following recursive formula can be used to find the factorial of a number?

A. fact(n) = n * fact(n)
B. fact(n) = n * fact(n+1)
C. fact(n) = n * fact(n-1)
D. fact(n) = n * fact(1)
Answer» C. fact(n) = n * fact(n-1)
Explanation: fact(n) = n * fact(n – 1) can be used to find the factorial of a number.
2.9k
0
Do you find this helpful?
21

Discussion

No comments yet