Quadrat special primes: Difference between revisions
→{{header|ALGOL 68}}: Use ALGOL 68-primes
(clarify task) |
(→{{header|ALGOL 68}}: Use ALGOL 68-primes) |
||
Line 9:
=={{header|ALGOL 68}}==
{{Trans|ALGOL W}}
{{libheader|ALGOL 68-primes}}
<lang algol68>BEGIN # find some primes where the gap between the current prime and the next is a square #
# an array of squares #
PROC get squares = ( INT n )[]INT:
Line 30 ⟶ 19:
END # get squares # ;
INT max number = 16000;
PR read "primes.incl.a68" PR
[]BOOL prime =
[]INT square = get squares( max number );
INT p count, this prime, next prime;
|