- #106
Yersinia Pestis
- 15
- 0
Could you be kind enough to explain why it's crashing when n-r==0 ?
EDIT: I changed the condition for the if statement in 'factorial' to (num==1 || num==0) and now it works fine. I'm never nicking code off the internet again.
Thanks for bringing it to my attention. I can't believe I didn't spot that after going over the problem for 40 minutes.
EDIT: I changed the condition for the if statement in 'factorial' to (num==1 || num==0) and now it works fine. I'm never nicking code off the internet again.
Thanks for bringing it to my attention. I can't believe I didn't spot that after going over the problem for 40 minutes.
Last edited: