inline bool isOdd(const int n) { return n % 2; }
inline bool isEven(const int n) { return ! isOdd(n); }
// Here's another approach looking at the low order bit. // May not work with negative numbers. inline bool isOdd(const int n) { return n & 1; }
inline bool isOdd(const int n) { return n % 2; }
inline bool isEven(const int n) { return ! isOdd(n); }
// Here's another approach looking at the low order bit. // May not work with negative numbers. inline bool isOdd(const int n) { return n & 1; }