@[email protected] to Lemmy [email protected]English • 11 months agoI wishi.imgur.comimagemessage-square188fedilinkarrow-up1928arrow-down117
arrow-up1911arrow-down1imageI wishi.imgur.com@[email protected] to Lemmy [email protected]English • 11 months agomessage-square188fedilink
minus-square@[email protected]linkfedilink46•11 months agoJust 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-square@[email protected]linkfedilinkEnglish48•11 months agoGod, 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-square@[email protected]linkfedilink5•11 months agoObviously you couldn’t account for every number with only two lines.
minus-square@[email protected]linkfedilink2•11 months agoEventually, it would wrap onto a second line, wouldn’t it?
minus-square@[email protected]linkfedilink7•11 months agoWhen 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.
Only if your line is not long enough…
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.