Perfect numbers: Difference between revisions
Content added Content deleted
Space Ghost (talk | contribs) (Perfect Numbers task written in Odin) |
(Added Easylang) |
||
Line 1,554: | Line 1,554: | ||
return sum <=> x |
return sum <=> x |
||
}</syntaxhighlight> |
}</syntaxhighlight> |
||
=={{header|EasyLang}}== |
|||
<syntaxhighlight lang=easylang> |
|||
func perf n . |
|||
for i = 1 to n - 1 |
|||
if n mod i = 0 |
|||
sum += i |
|||
. |
|||
. |
|||
return if sum = n |
|||
. |
|||
for i = 2 to 10000 |
|||
if perf i = 1 |
|||
print i |
|||
. |
|||
. |
|||
</syntaxhighlight> |
|||
=={{header|Eiffel}}== |
=={{header|Eiffel}}== |