Untouchable numbers: Difference between revisions
→{{header|ALGOL 68}}: Use ALGOL 68-primes
m (→{{header|ALGOL 68}}: Notes on how to run with Algol 68G) |
(→{{header|ALGOL 68}}: Use ALGOL 68-primes) |
||
Line 71:
<br><br>
Note that under Windows (and possibly under Linux), Algol 68G requires that the heap size be increased in order to allow arrays big enough to handle 100 000 and 1 000 000 untouchable numbers. See [[ALGOL_68_Genie#Using_a_Large_Heap]].
{{libheader|ALGOL 68-primes}}
<lang algol68>BEGIN # find some untouchable numbers - numbers not equal to the sum of the #
# proper divisors of any +ve integer #
Line 127 ⟶ 128:
# sieve the primes to max untouchable and flag the non untouchables #
BEGIN
PR read "primes.incl.a68" PR
FOR i FROM 3 BY 2 TO UPB prime DO
IF prime[ i ] THEN
|