hp-support-head-portlet

Actions
Loading...

HP Customer Support

hp-contact-secondary-navigation-portlet

Actions
Loading...

hp-share-print-widget-portlet

Actions
Loading...

hp-concentra-wrapper-portlet

Actions
Loading...

HP 12c Calculator - What Is a Program?

Introduction
This document will explain what a program is, give the advantages of programming, and show how to create and run a sample program.
What is a program?
A program is a sequence of keystrokes that is remembered by the calculator. When a sequence of keystrokes is to be repeated several times, a program could save a great deal of time. Instead of pressing all the keys each time, only one key needs to be pressed to start the program - the calculator does the rest.
The HP-12chas three keys which are used to key in and run a program: [f] [P/R] (to set the calculator to program mode or run mode), [f] CLEAR [PRGM] (to clear program memory), and [R/S] (to run (start) and stop a program).
Creating a program
To create a program:
  1. Write down the sequence of keystrokes that you would use to do the desired calculation.
  2. Press [f] [P/R] to set the calculator to program mode. The program status indicator (PRGM) is displayed when the calculator is in program mode.
  3. Press [f] CLEAR [PRGM] to erase any previous programs that may be stored.
  4. Key in the sequence of keystrokes that you wrote down in Step 1. Skip the keystrokes that enter data, which would differ each time the program is used.
Example of creating a program
An office supply dealer is selling selected stock at 25% off. An additional $5 handling charge is to be added to each transaction. Create a program, which calculates the net cost of an item after the discount is subtracted and the handling charge is added.
First, write down the steps to manually calculate the net cost of an item listing for $300 (this will also serve as a check solution after the program is written).
Keystrokes (RPN mode)
Display
Explanation
300 [ENTER]
300.00
The cost of the item is keyed in and separated from the next entry.
25 [%]
75.00
The amount of discount is calculated.
[-]
225.00
The price less discount is calculated.
5
5.
The handling charge is keyed in.
[+]
230.00
The net cost (price less discount plus handling charge) is calculated.
Next, set the calculator to program mode and erase any program(s) already stored:
Keystrokes (RPN mode)
Display
Explanation
[f] [P/R]
00-
Program mode is set. Notice the program mode annunciator (PRGM) in the display.
[f] CLEAR [PRGM]
00-
Previous programs are clear.
Finally, press the keys that you used above to solve the program manually.
 note:
Do not key in 300, as this number will vary each time the program is used.
The numbers that appear in the display as you press the keys indicate the step number and instruction for the step. If the display does not match the example, it is an indication that the keystroke was not entered correctly.
Keystrokes (RPN mode)
Display
[ENTER]
01- 36
2
02- 2
5
03- 5
[%]
04- 25
[-]
05- 30
5
06- 5
[+]
07- 40
Running the program
To run (or execute) a program:
  1. Press [f] [P/R] to set the calculator back to run (calculator) mode.
  2. Key in any required date.
  3. Press [R/S] (run/stop) to begin program execution.
Examples of running the program
Now run the program above using the check solution calculated in the first step (230).
Keystrokes (RPN mode)
Display
Explanation
[f] [P/R]
230.00
Run (calculator) mode is set. The display shows the number previously calculated.
300
300.
The cost is keyed in.
[R/S]
230.00
The net cost is calculated, and agrees with the check solution.
Use the program again with other values:
Calculate the net cost of a typewriter listed for $895.
Keystrokes (RPN mode)
Display
Explanation
895
895.
The cost of the typewriter is keyed in.
[R/S]
676.25
The net cost of the typewriter is calculated.
What is the net cost of an executive chair listing for $189?
Keystrokes (RPN mode)
Display
Explanation
189
189.
The cost of the chair is keyed in.
[R/S]
146.75
The net cost of the chair is calculated.

hp-feedback-input-portlet

Actions
Loading...

hp-online-communities-portlet

Actions
Loading...

Ask the community!


Support Forum

Support Forum

Join the conversation! Find Solutions, ask questions, and share advice with other HP product owners. Visit now


hp-feedback-banner-portlet

Actions
Loading...

hp-country-locator-portlet

Actions
Loading...
Country: Flag United States

hp-detect-load-my-device-portlet

Actions
Loading...