395
Rule (lemmy.blahaj.zone)
submitted 3 months ago by Persona3Reload to c/196
you are viewing a single comment's thread
view the rest of the comments
[-] tipicaldik@lemmy.world 15 points 3 months ago

I remember coding actionscript in Flash and using modulo (%) to determine if a number was even or odd. It returns the remainder of the number divided by 2 and if it equals anything other than 0 then the number is odd.

[-] Korne127@lemmy.world 25 points 3 months ago

Yeah. The joke is that this is the obvious solution always used in practise, but the programmer is that bad that they don't know it and use some ridiculous alternative solutions instead.

[-] superkret@feddit.org 20 points 3 months ago

I believe that's the proper way to do it.

this post was submitted on 31 Oct 2024
395 points (100.0% liked)

196

16845 readers
1743 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 2 years ago
MODERATORS