← Back to If Statements
Question 221
Sign And Parity Nested
Sign And Parity Nested
Read a whole number. When it is above zero, say whether it is positive even or positive odd using the remainder operator % inside a nested if; when it is not above zero print Not positive. Input: one integer, no prompt. Output: one line. The outer if / else is given; write the inner if / else inside the first branch.
Expected Output:
positive even= newline. The output ends with a newline — print one after the last line.
Hints3 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.