HP -20S Owner's Manual page 84

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

Advertisement

Example: Your accountant asks you to write a program that calcu-
lates the amount of tax a person is required to pay. You know that if
the income exceeds $30,000.00, then the tax rate is 38%. If the in-
come is less than or equal to $30,000.00, the tax rate is 28%. The
question is: is income < 30,000.00? Or to state it a different way: is
x<y?
Keys:
(=)
()
() (LBL] A
() 7]
() (cTo] 0
(=) (swap]
3
82
6: Programming
Display:
00-
01- 61 41 A
02- 31
04- 0
05- 0
06- 0
09- 51410
10- 51 31
11- 55
12- 3
Description:
Enters Program mode.
Clears previous
programs.
Names program.
Enters display value
into x-position for con-
ditional test.
Enters first digit of
30,000.
Enters last digit of
30,000.
Conditional test: is
x < 30,000? Does next
line if true, otherwise
skips one line.
Goes to label 0 if
income < 30,000.
Exchanges 30,000 and
income.
Multiplies x-value.
Each digit uses one
program line.

Advertisement

Table of Contents
loading

Table of Contents