Question: C++ please show each step of this recursion and explain why it doesn't work with (count + 1, n - 1) in the third line

C++

please show each step of this recursion and explain why it doesn't work with (count + 1, n - 1) in the third line of the function.

calculateFactorial(1, 5);

int calculateFactorial(int count, int n) { if (count <= n) { return n * calculateFactorial(count++, n - 1); } return 1; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!