Test for remainder value of 0
The conditional clause in the if statement in
Listing 4 tests to determine if the remainder is 0.
- If the remainder value is 0,
Listing 4 produces the message indicating that the input was
even.
- If the remainder value is not 0,
Listing 4 produces the message indicating that
the input was odd.