Comment on I wish
lobut@lemmy.ca 1 year 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 1 year 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 1 year ago
God, it’s so obvious, you can do it in only two lines of code.
Arbiter@lemmy.world 1 year ago
Obviously you couldn’t account for every number with only two lines.
ruckblack@sh.itjust.works 1 year ago
Maybe you couldn’t
scutiger@lemmy.world 1 year ago
Eventually, it would wrap onto a second line, wouldn’t it?
bouh@lemmy.world 1 year ago
Only if your line is not long enough…