10

A number is even if it is divisible by 2 (n % 2 == 0), otherwise it is odd.

Solution 1: Modulus C++ 3 lines
int n = 7;
if(n % 2 == 0) cout << "Even";
else cout << "Odd";
Solution 2: Bitwise AND (faster) C++ 3 lines
// The last bit of an odd number is always 1
if(n & 1) cout << "Odd";
else cout << "Even";