Ategon to Programmer [email protected] • 2 years agoHow to detect if a number is evenprogramming.devimagemessage-square20fedilinkarrow-up170arrow-down12
arrow-up168arrow-down1imageHow to detect if a number is evenprogramming.devAtegon to Programmer [email protected] • 2 years agomessage-square20fedilink
minus-squarejeff 👨💻linkfedilink14•2 years agobool isEven(int num) { return !isOdd(num); } bool isOdd(int num) { return !isEven(num); }
minus-squareSpylinkfedilink1•2 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