Comment on I wish
lobut@lemmy.ca 2 years ago
Just do a while loop and subtract 2 if it’s positive or plus 2 is it’s negative until it reaches 1 or 0 and that’s how you know, easy! /s
Comment on I wish
lobut@lemmy.ca 2 years ago
Just do a while loop and subtract 2 if it’s positive or plus 2 is it’s negative until it reaches 1 or 0 and that’s how you know, easy! /s
KoboldCoterie@pawb.social 2 years ago
God, it’s so obvious, you can do it in only two lines of code.
Arbiter@lemmy.world 2 years ago
Obviously you couldn’t account for every number with only two lines.
ruckblack@sh.itjust.works 2 years ago
Maybe you couldn’t
scutiger@lemmy.world 2 years ago
Eventually, it would wrap onto a second line, wouldn’t it?
bouh@lemmy.world 2 years ago
Only if your line is not long enough…