RosettaCodeData/Task/Perfect-numbers/Phix/perfect-numbers-1.phix
2019-09-12 10:33:56 -07:00

7 lines
142 B
Text

function is_perfect(integer n)
return sum(factors(n,-1))=n
end function
for i=2 to 100000 do
if is_perfect(i) then ?i end if
end for