You should notice that for certain GPA values the output is incorrect. If you did not make this error when correcting your program, introduce it and run your program with several different input values and examine the results. Correct your program and make sure it works for all four categories of GPA values. You will e-mail this corrected program file to your lab account later in this assignment. In the case of loop statements containing errors there is a pattern to the kinds of mistakes programmers make most often.
Most errors involve the first or last iteration of the loop.
They may also be caused by an incorrect condition in the while or not providing the correct initializations before the loop. Since values of type double are stored as approximations rather than exact values, comparing them for equality is not meaningful. Trace through the program by hand to determine the cause of the infinite loop condition. Then modify your program so that it will use the loop to correctly display the multiples of 5 between 1 and 40. Task 4 - Tracing loop statements 1.