logo

Crowdly

Browser

Add to Chrome

What will be the output of the following code: int factorial(int n) {    if...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What will

be the output of the following code:

int factorial(int n) {

   if(n

== 0)

     

return 1;

   else

     

return n * factorial(n-1);

}

int main() {

   int

number = 5;

   cout<<factorial(number);

   return

0;

}

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.astanait.edu.kz?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome