Getting user input
(Display Listing 2.)
This program uses the same code as the previous program to:
- Get an input integer from the user.
- Test to determine if it is even or odd.
- Set the value of the variable named testResult to true for
input and false for odd input.
This code appears at two different locations within the program.