Idoneal numbers: Difference between revisions
→{{header|Action!}}: Simplification - don't need a loop to find c
(→{{header|ALGOL 68}}: Further simplification - don't need a loop to find c) |
(→{{header|Action!}}: Simplification - don't need a loop to find c) |
||
Line 34:
count = 0 maxCount = 65
n = 0
n2 = n -
WHILE count < maxCount DO
n ==+ 1
Line 43:
b = a + 1
DO
ab = a * b
sum = ab + ( c * ( b + a ) )
IF c > b AND sum = n THEN idoneal = 0 FI
b
UNTIL sum > n
OD
a ==+ 1
|