RosettaCodeData/Task/Perfect-numbers/Lingo/perfect-numbers.lingo
2023-07-01 13:44:08 -04:00

8 lines
136 B
Text

on isPercect (n)
sum = 1
cnt = n/2
repeat with i = 2 to cnt
if n mod i = 0 then sum = sum + i
end repeat
return sum=n
end