Ategon@programming.dev to Programmer Humor@programming.dev · 3 years agoHow to detect if a number is evenprogramming.devimagemessage-square18linkfedilinkarrow-up131arrow-down11
arrow-up130arrow-down1imageHow to detect if a number is evenprogramming.devAtegon@programming.dev to Programmer Humor@programming.dev · 3 years agomessage-square18linkfedilink
minus-squarejeff 👨💻@programming.devlinkfedilinkarrow-up4·3 years agobool isEven(int num) { return !isOdd(num); } bool isOdd(int num) { return !isEven(num); }
minus-squareSpy@programming.devlinkfedilinkarrow-up1·3 years agoLegends say this code runs faster than what the op posted. StackOverflow Errors are surprisingly fast in most languages
bool isEven(int num) { return !isOdd(num); } bool isOdd(int num) { return !isEven(num); }Legends say this code runs faster than what the op posted. StackOverflow Errors are surprisingly fast in most languages