HP (Hewlett-Packard) 12C Calculator User Manual


 
Section 8: Programming Basics 105
File name: hp 12c pt_user's guide_English_HDPMF123E27 Page: 105 of 275
Printed Date: 2005/8/1 Dimension: 14.8 cm x 21 cm
Example:
Your office supplies dealer is selling selected stock at 25% off. Create
a program that calculates the net cost of an item after the discount is subtracted
and the $5 handling charge is added.
First, we’ll manually calculate the net cost of an item listing for $200.
Keystrokes
(RPN mode)
Display
200
200.
Keys in cost of item.
\
200.00
Separates cost of item from
percentage to be keyed in next.
25
b
50.00
Amount of discount.
-
150.00
Price less discount.
5
5.
Handling charge.
+
155.00
Net cost (price less discount plus
handling charge).
Keystrokes
(ALG mode)
Display
200
200.
Keys in cost of item.
-
200.00
Separates cost of item from
percentage to be keyed in next.
25
b
50.00
Amount of discount.
+
150.00
Price less discount.
5
5.
Handling charge.
}
155.00
Net cost (price less discount plus
handling charge).
Next, set the calculator to Program mode and erase any program(s) already
stored:
Keystrokes Display
fs
Sets calculator to Program mode.
f
CLEAR
Î
000,
Clears program(s).
Finally, press the keys that we used above to solve the problem manually. Do not
key in 200; this number will vary each time the program is used. Don’t be
concerned right now about what appears in the display as you press the keys;
we’ll discuss that later in this section.