Distinguishing even from odd ...
Note the use of the modulus operator (%) to determine if the user's input value is even or odd.
The code in Listing 4 uses the modulus operator to get the remainder produced by dividing the user's input value by 2.