nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 3 年前I wishi.imgur.comexternal-linkmessage-square187fedilinkarrow-up1932
arrow-up1932external-linkI wishi.imgur.comnave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 3 年前message-square187fedilink
minus-squarelobut@lemmy.calinkfedilinkarrow-up46·3 年前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
minus-squareKoboldCoterie@pawb.sociallinkfedilinkEnglisharrow-up48·3 年前God, it’s so obvious, you can do it in only two lines of code. if (number == 1 || number == 3 || number == 5 || number == 7 || number == 9...) return false; else return true;
minus-squareArbiter@lemmy.worldlinkfedilinkarrow-up6·3 年前Obviously you couldn’t account for every number with only two lines.
minus-squarescutiger@lemmy.worldlinkfedilinkarrow-up2·3 年前Eventually, it would wrap onto a second line, wouldn’t it?
minus-squareruckblack@sh.itjust.workslinkfedilinkarrow-up7·3 年前When you run out of space, you just add a monitor to the right side. Honestly, it’s like you guys aren’t real developers.
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
God, it’s so obvious, you can do it in only two lines of code.
if (number == 1 || number == 3 || number == 5 || number == 7 || number == 9...) return false; else return true;Obviously you couldn’t account for every number with only two lines.
Maybe you couldn’t
Eventually, it would wrap onto a second line, wouldn’t it?
When you run out of space, you just add a monitor to the right side. Honestly, it’s like you guys aren’t real developers.
Only if your line is not long enough…