
Lesson 7-5: Debugging
Additional Control Structures | 167
Name __________________________________________ Date _______________________
Section _________________________________________
Exercise 1: Program Bugs is supposed to sum the first ten values on a file and the second ten
values on a file. The second ten values are a duplicate of the first ten, so the answers should be the
same. The program checks to be sure that the file has been found and halts execution if the file is
not found. Program Bugs compiles, but says that the file cannot be found and then the screen
freezes. Can you find the problem? Describe it.
Exercise 2: Correct the problem and ...