17–8 Miscellaneous Programs and Equations
File name 32sii-Manual-E-0424
Printed Date : 2003/4/24 Size : 17.7 x 25.2 cm
Program Listing:
Program Lines: Description
&
&
This routine displays prime number P.
&
#$
Checksum and length: 5D0B 003.0
'
'
This routine adds 2 to P.
'
'
-
Checksum and length: 0C68 004.5
This routine stores the input value for P.
!
ª
º/¸@
Tests for even input.
!-
Increments P if input an even number.
!
Stores 3 in test divisor, D.
Checksum and length: 40BA 016.5
%
%
This routine tests P to see if it is prime.
%
%
ª
%
Finds the fractional part of P
÷
D.
%
º/@
Tests for a remainder of zero (not prime).
%
!
'
If the number is not prime, tries next possibility.
%
%
!
%
%
º
>
¸@
Tests to see whether all possible factors have been
tried.