Maven (famous)@lemmy.zip to Programmer Humor@programming.dev · 2 months agoModern Programminglemmy.zipimagemessage-square19linkfedilinkarrow-up14arrow-down10
arrow-up14arrow-down1imageModern Programminglemmy.zipMaven (famous)@lemmy.zip to Programmer Humor@programming.dev · 2 months agomessage-square19linkfedilink
minus-squarekn0wmad1c@programming.devlinkfedilinkEnglisharrow-up0·edit-22 months agonum % 2 isn’t a boolean result in any of these languages, so I feel like it would always output “odd” Edit: 0 is false, everything else is true.
minus-squareKaboom@reddthat.comBannedlinkfedilinkarrow-up0arrow-down1·2 months ago0 is false in C, Python, and JS. It should work
num % 2
isn’t a boolean result in any of these languages, so I feel like it would always output “odd”Edit: 0 is false, everything else is true.
0 is false in C, Python, and JS. It should work