← Back to If Statements
Question 206
Even or Odd
Even or Odd
Read a single whole number from the keyboard and decide whether it is even or odd. A number is even when it divides by 2 with no remainder, and odd otherwise. Use the modulo operator (%) inside an if/else statement and print the word Even or the word Odd (with a capital first letter). Print nothing else.
Expected Output:
Even= newline. No newline after the last line.
Hints3 available
Sign in to use hintsTopics:
If Statements
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.