Ategon@programming.dev to Programmer Humor@programming.dev · 3 years agoHow to detect if a number is evenprogramming.devimagemessage-square19linkfedilinkarrow-up151arrow-down12
arrow-up149arrow-down1imageHow to detect if a number is evenprogramming.devAtegon@programming.dev to Programmer Humor@programming.dev · 3 years agomessage-square19linkfedilink
minus-squarejeff 👨💻@programming.devlinkfedilinkarrow-up3·3 years agobool isEven(int num) { return !isOdd(num); } bool isOdd(int num) { return !isEven(num); }
minus-squareSpy@programming.devlinkfedilinkarrow-up0·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