Miscellaneous Programs and Equations 17–9
File name 32sii-Manual-E-0424
Printed Date : 2003/4/24 Size : 17.7 x 25.2 cm
Program Lines:
Description
%
!
&
If all factors have been tried, branches to the display
routine.
%
Calculates the next possible factor,
D
+ 2.
%
!-
%
!
%
Branches to test potential prime with new factor.
Checksum and length: 061F 021.0
Flags Used:
None.
Memory Required:
61 bytes: 45 for program, 16 for variables.
Program Instructions:
1.
Key in the program routines; press
when done.
2.
Key in a positive integer greater than 3.
3.
Press
W
P
to run program. Prime number,
P
will b e displayed.
4.
To see the next prime number, press
f
.
Variables Used:
P
Prime value and potential prime values.
D
Divisor used to test the current value of
P
.
Remarks:
No test is made to ensure that the input is greater than 3.
Example.
What is the first prime number after 789
?
What is the next prime number
?
Keys: Display:
Description:
Содержание 32SII
Страница 14: ......
Страница 15: ...File name 32sii Manual E 0424 Printed Date 2003 4 24 Size 17 7 x 25 2 cm Part 1 Basic Operation ...
Страница 16: ......
Страница 38: ......
Страница 56: ......
Страница 64: ......
Страница 110: ......
Страница 122: ......
Страница 132: ......
Страница 140: ......
Страница 148: ......
Страница 190: ......
Страница 216: ......
Страница 297: ...File name 32sii Manual E 0424 Printed Date 2003 4 24 Size 17 7 x 25 2 cm Part 3 Appendixes and Reference ...
Страница 298: ......
Страница 308: ......
Страница 330: ......
Страница 360: ......