Ategon@programming.dev to Programmer Humor@programming.dev · 1 year agoHow to detect if a number is evenprogramming.devimagemessage-square20fedilinkarrow-up142arrow-down12
arrow-up140arrow-down1imageHow to detect if a number is evenprogramming.devAtegon@programming.dev to Programmer Humor@programming.dev · 1 year agomessage-square20fedilink
minus-squarejeff 👨💻@programming.devlinkfedilinkarrow-up10·1 year agobool isEven(int num) { return !isOdd(num); } bool isOdd(int num) { return !isEven(num); }
minus-squareSpy@programming.devlinkfedilinkarrow-up1·1 year 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