Write a recursive method to compute the factorial of a nonnegative integer using the definition shown below:

Question:

Write a recursive method to compute the factorial of a nonnegative integer using  the definition shown below:

\[
\operatorname{factorial}(n)=\{\text { if } n \geq 1 \text {, then } n * \text { factorial }(n-1), \text { otherwise }, 1\}
\]

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: