HP -20S Owner's Manual page 85

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

Advertisement

8
13- 8
Enters tax rate.
<)
14- 51 14
(=]
15- 74
38% of x-value.
R/S
16- 26
Halts program.
=
0
17- 61 410
Starts routine for
income < 30,000.
Y
18- 51 31
Exchanges 30,000 and
x-value.
19- 55
Multiplies x-value.
2
20- 2
Each digit uses one
program line.
8
21- 8
Enters tax rate.
(#)
22- 51 14
(=)
23- 74
28% of x-value.
R/S
24- 26
Halts the program.
(-]
d6éb6
Checksum (page 66).
)
Exits Program mode.
Test the program by comparing samples done manually. For example,
15000
28 [\](%][=] 4,200.0000. Test a few more incomes manually,
then run the program and compare them. To run the program, enter
the income value in the display and press
A.
The : that appears in the display after the program is complete is
caused by the
that separates income from 30,000 for the condi-
tional test in line 08. The program can be rewritten so that
is used
to separate income from 30,000 for the conditional test. Also, to save
program lines, the common keystrokes can be grouped together. The
following program uses conditional branching and unconditional
branching for the common keystrokes.
6: Programming
83

Advertisement

Table of Contents
loading

Table of Contents