Important changes to the code

The most important thing to note about the code in Listing 5 is the following:

Otherwise, the program in Listing 5 is straightforward.

The output

The screen output produced by the program is

a = 2
a doubled = 4