EasyManuals Logo

HP 12C User Manual

HP 12C
278 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #132 background imageLoading...
Page #132 background image
132 Section 9: Branching and Looping
File name: hp 12c pt_user's guide_English_HDPMF123E27 Page: 132 of 275
Printed Date: 2005/8/1 Dimension: 14.8 cm x 21 cm
Keystrokes
(RPN mode)
Display
go
003, 43 34
Tests whether number in X-re
g
ister
(income) is less than or equal to
number in Y-register (20,000).
gi
007
004,43, 33, 007
If condition is true, branches to
program line 007.
:
2
005, 45 2
If condition is false, recalls 25%
tax rate to X-register.
gi
008
006,43, 33, 008
Branches to program line 008.
:
1
007, 45 1
Recalls 20% tax rate to X-register.
b
008, 25
Calculates tax.
fs
–190.22
Sets calculator to Run mode.
(Display shows results of running
of previous program.)
ALG program notes:
We’ll key the income into the display before running the
program. We’ll store it in R
9
so it will be available for the examples in the next
chapter. By keying the income into the display before running the program, we
ensure that it will be in the X-register when the
:
0 instruction in program line
002 is executed. This instruction will place the test value 20,000 in the X-register
and move the income into the Y-register. The
~
instruction in program line 003
will exchange the numbers in the X- and Y-registers: that is, it will place the income
back into the X-register and place the test value into the Y-register. This is
necessary because when either the
:
2 instruction in line 007 or the
:
1
instruction in line 009 is executed, the number in the X-register is moved into the
Y-register; if the
~
instruction were not included, the test value 20,000, rather
than the income, would be in the Y-register when the
b
instruction in line 010 is
executed.
Keystrokes
(ALG mode)
Display
f[
fs
007,43, 33, 002
Sets calculator to Program mode.
(Display shows program line at
which execution was halted at
end of preceding example.)
f
CLEAR
ÃŽ
000,
Clears program memory.
?
9
001, 44 9
Stores income into register R
9
.

Table of Contents

Other manuals for HP 12C

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 12C and is the answer not in the manual?

HP 12C Specifications

General IconGeneral
TypeFinancial Calculator
DisplayLCD, 10 digits
ManufacturerHewlett-Packard
ProgrammingKeystroke
Memory20 memory registers
Functionsstatistical functions
Dimensions12.7 x 7.87 x 1.52 cm (5 x 3.1 x 0.6 in)

Related product manuals