Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • \$\begingroup\$ I'm not sure why, but even if the number of recursive calls is restricted like this, it doesn't seem to output as intended... \$\endgroup\$ Commented Dec 13, 2020 at 18:58
  • \$\begingroup\$ Thanks @DominicvanEssen, I've gotten it to output with an additional change but it's definitely not what I was expecting. Maybe my submission was not correct. \$\endgroup\$ Commented Dec 13, 2020 at 22:01
  • \$\begingroup\$ It isn't what I was expecting either. Your changed version also only seems to output the final 0 (from the innermost recursive call), not all the prints from each call... \$\endgroup\$ Commented Dec 13, 2020 at 22:15