โ Back to If Statements
Question 254
Positive and Even
Positive and Even
Read an integer withscanf. If the number is BOTH positive (greater than 0) AND even, print exactly: Yes Otherwise print exactly: No No trailing newline. For input6the output isYes; for input-4the output isNo(it is even but not positive).
Expected Output:
Yes
Topics:
If Statements
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.