Section 6: Programming Basics

71

The program to calculate this information uses these formulas and data: base area = πr2.

volume = base area × height = πr2h.

surface area = 2 base areas + side area = 2πr2 + 2πrh.

Radius, r

Height, h

Base Area

Volume

Surface Area

2.5cm

8.0 cm

?

?

?

4.0

10.5

?

?

?

4.5

4.0

?

?

?

 

TOTALS

?

?

?

Method:

1.Enter an r value into the calculator and save it for other calculations. Calculate the base area (πr2), store it for later use, and add the base area to a register which will hold the sum of all base areas.

2.Enter h and calculate the volume (πr2h). Add it to a register to hold the sum of all volumes.

3.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.

Keystrokes

Display

 

¥

000-

Sets calculator to Program

 

 

mode (PRGM displayed).

´ CLEAR M

000-

Clears program memory. Starts

 

 

at line 000.

Page 71
Image 71
HP 15c Scientific manual Radius, r Height, h Base Area Volume Surface Area, Totals