Recursive print Factorial

return factValue * printFactorial(factValue - factCounter);

I assume that you should be using the “next” values instead of these.

Edit: Also note that the function takes two parameters and is void. Returning factValue times void doesn’t make sense.

Leave a Comment