← Back to If Statements
Question 245
Five Ways To Describe A Number
Five Ways To Describe A Number
Read a whole number and describe it in two words, sign then parity: positive even, positive odd, negative even or negative odd; zero is a special case that prints just zero. Use the remainder operator % for the parity and nest the parity test inside each sign branch. Input: one integer, no prompt. Output: one line.
Expected Output:
zero= newline. The output ends with a newline — print one after the last line.
Hints4 available
Sign in to use hintsTopics:
If StatementsOperators
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.