Special neighbor primes: Difference between revisions
→{{header|ALGOL 68}}: Use the new prime list routines in Algol 68-primes
(→{{header|ALGOL 68}}: Use the new prime list routines in Algol 68-primes) |
|||
Line 10:
{{libheader|ALGOL 68-primes}}
<lang algol68>BEGIN # find adjacent primes p1, p2 such that p1 + p2 - 1 is also prime #
PR read "primes.incl.a68" PR
[]BOOL prime = PRIMESIEVE ( max prime * 2 ); #
[]INT
# find the adjacent primes p1, p2 such that p1 + p2 - 1 is prime #
FOR i TO UPB low prime - 1 DO
|