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; }