Even Odd
Practice this coding question on Coding Gurukul.
Problem statement
A theatre packs numbered seat tokens into pairs. The packing machine needs to know whether the token count can be divided into pairs without a leftover token. Your task Determine whether the nonnegative integer n is even or odd. Important details A number is even when division by two leaves remainder zero. Otherwise it is odd. An empty box contains zero tokens and is classified as even because it has no leftover token. The result depends on the value, not on how many decimal digits it contains. Use the exact capitalization specified in the output contract so the machine can read your classification. Worked example A box containing 18 tokens forms nine pairs, so its output is Even. With 19 tokens, one remains and the output is Odd.
Input format
One integer n.
Output format
Print Even or Odd.
Constraints
0 <= n <= 1000000000.
Sample input
18
Sample output
Even
Sign in to run or submit a solution in C++, Java or Python.