Practice
Odd or Even Function
2025/May/Jun·Variant 1
EASYProcedures & Functions
Write a function named Odds that takes an integer parameter X and returns "Even" if the number is even, or "Odd" if it is odd.
In the main program: input an integer into A, call Odds(A), store the result in B, and output B.
Input: A single integer.
Output: "Even" or "Odd".
Example:
Input: 7
Output: Odd
Premium is coming soon. All grading features are currently unlocked.
Sample Test Cases
Test 1: Positive even
Inputs: 4
Expected: Even
Test 2: Positive odd
Inputs: 7
Expected: Odd
Test 3: Zero is even
Inputs: 0
Expected: Even
Ctrl+Enter
Press Ctrl+Enter to run your code
or Ctrl+Shift+Enter to grade