RosettaCodeData/Task/Perfect-numbers/Lingo/perfect-numbers.lingo
2016-12-05 23:44:36 +01: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