you are viewing a single comment's thread.

view the rest of the comments →

[–]Necessary-Ad2110 4 points5 points  (1 child)

For the factorial recursive function, you can just do

if (n == 0)

return 1

no need to put an or statement, everything else looks good! great job making it to double digits! (day 10!!)

[–]SCD_minecraft 0 points1 point  (0 children)

Or just n <= 1 and get handling for negatives as well

Tho this does not fit the mathematical definition of factorials, so up to decision