
Lesson 8-5: Debugging
192 | Chapter 8
Name __________________________________________ Date _______________________
Section _________________________________________
Exercise 1: Program Triangle inputs three values representing the lengths of the three sides of a
triangle. If the three sides represent an equilateral triangle, “Equilateral” is printed. If the three
sides represent an isosceles triangle, “Isosceles” is printed. If the three sides are all different,
“Scalene” is printed. There is one problem: The program doesn’t work. Debug it.
What errors did you find?
Show the last three lines of output.
Exercise 2: Look carefully at the last three lines ...