HP (Hewlett-Packard) HP 33s Calculator User Manual


 
Simple Programming
12–1
File name 33s-English-Manual-040130-Publication(Edition 2).doc Page : 388
Printed Date : 2004/1/30 Size : 13.7 x 21.2 cm
12
Simple Programming
Part 1 of this manual introduced you to functions and operations that you can use
manually, that is, by pressing a key for each individual operation. And you saw
how you can use equations to repeat calculations without doing all of the
keystrokes each time.
In part 2, you'll learn how you can use
programs for repetitive calculations —
calculations that may involve more input or output control or more intricate logic. A
program lets you repeat operations and calculations in the precise manner you
want.
In this chapter you will learn how to program a series of operations. In the next
chapter, "Programming Techniques," you will learn about subroutines and
conditional instructions.
Example: A Simple Program.
To find the area of a circle with a radius of 5, you would use the
formula
A =
π
r
2
and press
RPN mode: 5
=
º
j
¸
ALG mode: 5
=
¸
º
j
Ï
to get the result for this circle, 78.5398.
But what if you wanted to find the
area of many different circles
?
Rather than repeat the given keystrokes each time (varying only the "5" for the
different radii), you can put the repeatable keystrokes into a program: