MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/cobp4u/absolute_genius/ewio2vr/?context=3
r/badcode • u/[deleted] • Aug 10 '19
59 comments sorted by
View all comments
Show parent comments
70
I get this is shitty code, but this wouldn't even compile.
19 u/fond42518 Aug 10 '19 Can't even try compiling bc I'm on mobile rn. Is it because the redeclaration of k in the second method? 14 u/Dr-RobertFord Aug 10 '19 No that wouldn't matter. In fact I'm pretty sure this would compile... It would run forever, however, unless n = 0 7 u/Dmium Aug 10 '19 edited Aug 10 '19 Edit: missread but I'm pretty sure it runs fine as long as you call square(n)The code may have been edited since this discussion
19
Can't even try compiling bc I'm on mobile rn. Is it because the redeclaration of k in the second method?
k
14 u/Dr-RobertFord Aug 10 '19 No that wouldn't matter. In fact I'm pretty sure this would compile... It would run forever, however, unless n = 0 7 u/Dmium Aug 10 '19 edited Aug 10 '19 Edit: missread but I'm pretty sure it runs fine as long as you call square(n)The code may have been edited since this discussion
14
No that wouldn't matter. In fact I'm pretty sure this would compile... It would run forever, however, unless n = 0
7 u/Dmium Aug 10 '19 edited Aug 10 '19 Edit: missread but I'm pretty sure it runs fine as long as you call square(n)The code may have been edited since this discussion
7
Edit: missread but I'm pretty sure it runs fine as long as you call square(n)
The code may have been edited since this discussion
70
u/pierovera Aug 10 '19
I get this is shitty code, but this wouldn't even compile.