Keys:
3.787
rXEOlL
R/S
25.73
IrTsI
E
Display:
Description:
3.787
Enters the hypothetical
result.
I
lvalue
Selects the length-
conversion
routine.
F?value
Moves to the
prompt
for
feet.
M?7.8425
Enters
the
divisor
in
feet,
then
converts
it
to
meters.
7.8425
0.4829
Cancels the prompt
and
ends the program.
Calculates
the
final
result.
Prime
Number
Generator
This program accepts any odd, positive integer greater than 3. If the
number
is a prime number (not evenly divisible by integers other
than
itself and 1), then the program returns the input value. If the input is
not
a prime number, then the program returns the first prime number
larger than the input.
The program identifies non-prime numbers by exhaustively trying all
possible factors. If a number is not prime, the program adds 2 (assur
ing
that
the value is still odd)
and
tests to see if it
has
found a prime.
This process continues
until
a prime
number
is found.
14:
Miscellaneous
Programs
235