RosettaCodeData/Task/Perfect-numbers/Craft-Basic/perfect-numbers.basic
2023-07-01 13:44:08 -04:00

23 lines
165 B
Text

for n = 1 to 10000
let s = 0
for i = 1 to n / 2
if n % i = 0 then
let s = s + i
endif
next i
if s = n then
print n, " ",
endif
wait
next n