Section 6: Programming Basics 71
The program to calculate this information uses these formulas and data:
base area = r
2
.
volume = base area × height =
r
2
h.
surface area = 2 base areas + side area = 2r
2
+ 2rh.
Enter an r value into the calculator and save it for other calculations.
Calculate the base area (r
2
), store it for later use, and add the base
area to a register which will hold the sum of all base areas.
Enter h and calculate the volume (r
2
h). Add it to a register to hold
the sum of all volumes.
Recall r. Divide the volume by r and multiply by 2 to yield the side
area. Recall the base area, multiply by 2, and add to the side area to
yield the surface areas. Sum the surface areas in a register.
Do not enter the actual data while writing the program just provide for
their entry. These values will vary and so will be entered before and/or
during each program run.
Key in the following program to solve the above problem. The display
shows line numbers and keycodes (the row and column location of a key),
which will be explained under Further Information.
Sets calculator to Program
mode (PRGM displayed).
Clears program memory. Starts
at line 000.