Sample Program: Pythagorean Theorem - HP -20S Owner's Manual

Scientific calculator
Hide thumbs Also See for HP-20S:
Table of Contents

Advertisement

Keys:
Display:
Description:
(=)
A
Moves program pointer
to label A.
5
5_
Enters 5 in the display.
(=) (] (hold)
01- 61 41 A
Label A.
(release)
5.0000
(=] [v] (hold)
02- 51 11
Squares input.
(release)
25.0000
(=] (V] (hold)
03- 55
Multiplies 25 by ...
(release)
25.0000
(9] (v] (hold)
04- 61 22
..
(release)
3.1416
(=] [v] (hold)
05- 45
Calculates intermedi-
(release)
78.5398
ate result.
(\) (] (hold)
06- 4
...+~ 4.
(release)
4_
(=) (Y] (hold)
07- 74
(release)
19.6350
(=] (V] (hold)
08- 61 26
End of program. Result
(release)
19.6350
is correct.
Sample Program: Pythagorean Theorem
You can use most of the HP-20S features in Program mode just like
you use them manually. To illustrate how
and
are used to
recall data from registers in a program, enter the following Pythago-
rean theorem program. It calculates the length of the hypotenuse (side
c) of a right triangle, given the lengths of sides a2 and b. The formula
used is ¢ = \/a? + b2. Assume that the calculation begins with side
a in R; and side b in R,.
6: Programming
73

Advertisement

Table of Contents
loading

Table of Contents