Idoneal numbers: Difference between revisions
→{{header|ALGOL 68}}: tweak
(Added a link to the O'Halloran numbers task) |
(→{{header|ALGOL 68}}: tweak) |
||
Line 27:
# where 0 < a < b < c #
# there are 65 known idoneal numbers #
INT count := 0;
FOR n WHILE count < max count DO
BOOL idoneal := TRUE;
FOR a TO n - 2 WHILE count <
FOR b FROM a + 1 TO n - 1
WHILE INT ab = a * b;
ab < n AND count <
DO
FOR c FROM b + 1 TO n
Line 39 ⟶ 40:
INT sum = ab + bc + ac;
sum <= n
AND count <
AND ( idoneal := sum /= n )
DO SKIP OD
|