nave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 8 months agoI wishi.imgur.comimagemessage-square149fedilinkarrow-up1850arrow-down117
arrow-up1833arrow-down1imageI wishi.imgur.comnave@lemmy.zip to Lemmy Shitpost@lemmy.worldEnglish · 8 months agomessage-square149fedilink
minus-squareKoboldCoterie@pawb.sociallinkfedilinkEnglisharrow-up44·8 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-squareArbiter@lemmy.worldlinkfedilinkarrow-up6arrow-down1·8 months agoObviously you couldn’t account for every number with only two lines.
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…