minor modification to program 4.4
added program to control the change to the loop control variable