r/ProgrammerAnimemes • • Mar 23 '20

Comments you can't remove

Post image
871 Upvotes

53 comments sorted by

View all comments

Show parent comment

3

u/bucket3432 Mar 24 '20

If you uncomment the code, then yes, it won't terminate. But as written it does because it doesn't call anything when n reaches 0.

1

u/StarDDDude Mar 24 '20

Oh yes thanks for clarifying, I overlooked how the else section wouldn't be executed if it reaches 0.