Section 9: Program Interruptions148
When a program is halted, you can resume execution by pressing R/S from the keyboard in normal mode. When you press R/S , the program begins execution with the next line as though it had never stopped at all.
###### Error Stops
If the HP-41C attempts to execute any error-causing operations during a running program, execution halts and the HP-41C displays an error message. For example, if a program attempts division by zero, the calculator displays DATA ERROR . If the program calculates a number too large for the calculator to handle, the HP-41C displays OUT OF RANGE .
To see the line in the program containing the error-causing instruction, briefly set the calculator to PRGM mode. Setting the HP-41C to PRGM mode clears the error, as does pressing    . You can then make the necessary changes to ensure proper execution.
The HP-41C has several functions that allow you to control how the calculator reacts to these and other errors. Section 14 of this handbook covers these error conditions in detail.
###### Problem
1.
 For several different sizes of cans, the supervisor at a canning company knows the radius r of the base of the can, the height h of the can, and n, the number of cans of that size. Write a program that will stop for the supervisor to key in the radius, the height, and the number of cans. The program should calculate the base area of one can, the volume of on can, and the total volume of all of the cans. Use PSE instructions to display the area and volume of the single cans before the total volume is displayed.

 Use the following flowchart to help you write and load the program. Assign the program to the TAN key location and run the program for 20,000 cans with heights of 25 centimeters and radii of 10 centimeters; for 7500 cans with height of 8 centimeters and radii of 4.5 centimeters. (Answers:

 A = 314.1593 cm2 V = 7,853.9816 cm3 Total Volume = 150,079,632.7 cm3 A = 63.6173 cm2 V = 508.9380 cm3 Total Volume = 3,817,035.074 cm3.)