Download Print this page

HP 35s User Manual page 2

Scientific calculator - writing a simple program
Hide thumbs Also See for HP 35s:

Advertisement

hp calculators
HP 35s Writing a Simple Program
Programming the HP 35s
Doing a simple calculation once on the HP 35s is easy. Doing the same calculation many times, or doing a complicated
calculation, takes longer. It can be better to store all the steps needed for the calculation in a program. A program is a
set of instructions, stored all together. Once it is written, it can be tested to see if it works correctly. Then it can be used
many times, without the need to press every key of the calculation each time.
A simple program is just a set of keystrokes stored so that they can be carried out with one key. The HP 35s provides
many commands to let programs do more, for example stop and ask for input, or show an intermediate result. This
training aid concentrates on simple programming; it also shows a few of the more advanced programming commands.
Practice example: the area of a circle
Given "r" the radius of a circle, the circle's area "A" is calculated from the formula A = π r ². For example to calculate the
area of a circle with radius 3cm, the following keys are pressed.
In RPN mode:
And in algebraic mode:
Repeating the same 6 keys in RPN mode or 8 keys in algebraic mode for many circles is a lot of work. Here is how a
program would make it easier.
Example 1: Write a program in RPN mode to calculate the area of a circle, given its radius r.
Solution:
An RPN program and an algebraic program are shown below. The RPN program is shown first, called "A"
for "Area".
In RPN mode, type the same keys for calculating the area as before, but mark the beginning of the
program with a label and the end of the program with a return.
First set program mode by typing º£ and then go to the top of program memory (called PRGM
TOP, see Figure 2), ready to begin a new program, by typing rËË. Now the program can be
typed:
ºÓAº=¹j¸¹Ô
The letter A is on the keyboard, below and to the right of the ¥ key. Whenever Ó is typed, the
HP 35s uses the keys with the letters A – Z marked next to them to enter those letters.
hp calculators
3º=¹j¸
º=3Õ¸¹jÏ
Figure 1
- 2 -
HP 35s Writing a Simple Program - Version 1.0

Advertisement

loading