Some numbers are just, well, odd. For example, the number 3 is odd, because it is not a multiple of two. Numbers that are a multiple of two are not odd, they are even. More precisely, if a number \(n\) can be expressed as \(n = 2 * k\) for some integer \(k\), then \(n\) is even. For example, \(6 = 2 * 3\) is even.
Some people get confused about whether numbers are odd or even. To see a common example, do an internet search for the query “is zero even or odd?” (Don’t search for this now! You have a problem to solve!)
Write a program to help these confused people.
Input begins with an integer \(1 \leq N \leq 20\) on a line by itself, indicating the number of test cases that follow. Each of the following n lines contain a test case consisting of a single integer \(-10 \leq X \leq 10\).
For each \(X\), print either "\(X\) is odd" or "\(X\) is even" depending on whether \(X\) is odd or even.
Lab I/O Format
Your program should use the Lab Input/Output Format, as described below:
- When prompting for input, use the prompt string
WORDis a single, uppercase word which describes the input.
- When providing output that will be graded, start the line with
OUTPUT. Think of this as "boxing your answer" on a math worksheet, it lets us quickly find your answer. We will ignore any lines which do not start with
- You may interleave the inputs and outputs in any order you wish. For example, you might want to recieve all of your inputs (order of inputs still matters!), then print all of your outputs (order of outputs still matters!), or you might want to do input/output, input/output, etc.
N> 4 X> 10 OUTPUT 10 is even X> 9 OUTPUT 9 is odd X> -5 OUTPUT -5 is odd X> 0 OUTPUT 0 is even
This problem was derived from a problem by Greg Hamerly. License is CC BY-SA.