Each object in Ruby may have methods associated with it. To demonstrate this, we want you to print whether a number is even or odd. A number has an even? method associated with it, which returns true or false based on the parity of the number.
Assuming a variable number is already defined, check whether a given number is even or not.
Type in the code-editor
The first line of input contains an integer .
The next contains one integer in each line.
The output is handled by the code written in the editor.