127
Programming Chapter 8
• The following function keys are also useful when editing program contents.
1 (TOP) ....... Moves the cursor to the top of the program
2 (BTM) ....... Moves the cursor to the bottom of the program
Example 2 To use the OCTA program to create a program that calculates
the surface area and volume of regular tetrahedrons when the
length of one side is known
Length of One Side (A) Surface Area (S) Volume (V)
7 cm cm
2
cm
3
10 cm cm
2
cm
3
15 cm cm
2
cm
3
The following are the formulas used for calculating surface area S and volume V of a
regular tetrahedron for which the length of one side is known.
2
S =
3 A
2
, V = –––– A
3
12
Use the following key operations when inputting the program.
Length of One Side A .. !W[1(?)aaA[2(:)
Surface Area S ............ !9d*aAx[[2(^)
Volume V ..................... !9c/bc*aAMd
Compare this with the program for calculating the surface area and volume of a
regular octahedron.
Length of One Side A .. !W[1(?)aaA[2(:)
Surface Area S ............ c*!9d*aAx[[2(^)
Volume V ..................... !9c/d*aAMd
As you can see, you can produce the TETRA program by making the following changes
in the OCTA program.
• Deleting c * (underlined using a wavy line above)
• Changing d to b c (underlined using a solid line above)
A