We will attempt to explain what a program is, give the advantages of programming, and show how to create and run a sample program.
On the HP 12c, 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 12c has 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).
To create a program:
Write down the sequence of keystrokes that you would use to do the desired calculation.
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.
Press [f ] CLEAR [PRGM ] to erase any previous programs that may be stored.
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.
Here is an 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).
300 [ENTER ] The cost of the item is keyed in and separated from the next entry.
25 [% ] The amount of discount is calculated.
[- ] The price less discount is calculated 225.00.
5 The handling charge is keyed in 5.
[+ ] The net cost (price less discount plus handling charge) is calculated 230.00.
Next, set the calculator to program mode and erase any program(s) already stored:
[f ] CLEAR [PRGM ] Previous programs are clear.
Next, press the keys that you used above to solve the program manually.
Do not key in 300, as this number will vary each time the program is used.
To run (or execute) a program:
Press [f ] [P/R ] to set the calculator back to run (calculator) mode.
Press [R/S ] (run/stop) to begin program execution.
Examples of running the program
Key in 300 for the the price.
Press [R/S ], the HP 12c should display 230.00 which is the discounted price plus shipment 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.
Key in 895 which is the list price of the typewriter.
Press [R/S ], the answer is 676.25. The discounted price plus shipment of the typewriter.
What is the net cost of an executive chair listing for $189?
Key in 189 which is the list price of the typewriter.
Press [R/S ], the answer is 146.75. The discounted price plus shipment of the typewriter.