Idoneal numbers: Difference between revisions
m
→{{header|ALGOL 68}}: Performance tweak
(Added Algol W) |
m (→{{header|ALGOL 68}}: Performance tweak) |
||
Line 119:
FOR n WHILE count < max count DO
BOOL idoneal := TRUE;
FOR a TO n
FOR b FROM a + 1 TO n - 1
WHILE INT ab = a * b;
Line 125:
INT sum = ab + ( c * ( b + a ) );
sum <= n
AND b < c
AND ( idoneal := c <= b OR sum /= n )
DO SKIP OD
|