MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerAnimemes/comments/fnuof3/comments_you_cant_remove/fleiis6/
r/ProgrammerAnimemes • u/bucket3432 • Mar 23 '20
53 comments sorted by
View all comments
Show parent comment
3
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.
n
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.
1
Oh yes thanks for clarifying, I overlooked how the else section wouldn't be executed if it reaches 0.
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
nreaches0.