Special neighbor primes: Difference between revisions
→{{header|ALGOL 68}}: Bug fix
(→{{header|ALGOL 68}}: Use ALGOL 68-primes) |
(→{{header|ALGOL 68}}: Bug fix) |
||
Line 13:
# sieve the primes to max prime * 2 #
PR read "primes.incl.a68" PR
[]BOOL prime = PRIMESIEVE ( max prime * 2 );
# count the primes up to max prime #
INT p count := 0; FOR i TO max prime DO IF prime[ i ] THEN p count +:= 1 FI OD;
|