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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)