andioop@programming.dev to Programming Horror@programming.devEnglish · edit-22 years agoGod I wish there was an easier way to do thisprogramming.devimagemessage-square45fedilinkarrow-up1180arrow-down120
arrow-up1160arrow-down1imageGod I wish there was an easier way to do thisprogramming.devandioop@programming.dev to Programming Horror@programming.devEnglish · edit-22 years agomessage-square45fedilink
minus-squareRandomVideos@programming.devlinkfedilinkarrow-up2·2 years agoThis code is terrible. If you input 10.66 it returns "number is odd It should be: if number % 2 == 0 return "number is even" (is_num_even = 1 or true) else return "number is not even" (is_num_even = 0 or false)
This code is terrible. If you input 10.66 it returns "number is odd
It should be:
if number % 2 == 0 return "number is even" (is_num_even = 1 or true) else return "number is not even" (is_num_even = 0 or false)