Perfect numbers: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
=={{header|Ada}}== |
=={{header|Ada}}== |
||
<lang ada> |
|||
<Ada> |
|||
function Is_Perfect(N : Positive) return Boolean is |
function Is_Perfect(N : Positive) return Boolean is |
||
Sum : Natural := 0; |
Sum : Natural := 0; |
||
Line 17: | Line 17: | ||
return Sum = N; |
return Sum = N; |
||
end Is_Perfect; |
end Is_Perfect; |
||
</ |
</lang> |
||
=={{header|ALGOL 68}}== |
=={{header|ALGOL 68}}== |
||
PROC is perfect = (INT candidate)BOOL: ( |
PROC is perfect = (INT candidate)BOOL: ( |