I am doing an assignment displaying a table of factorials from 0 to 20 using recursion. Everything works fine, but I can not figure out how to display the correct value for 0. I have tried several modifications within the function, but feel there must be some bit of logic I am misunderstanding. Any nudge in the right direction would be appreciated. Here is my code:
I see. So I should think of 0! basically like an exponent. Thank you for that. I meant to edit line 9 out when I was trying to figure out how to print the table. I really can't think of another way to print all of the values that wouldn't over-complicate the code.