Perfect numbers: Difference between revisions
Content added Content deleted
Underscore (talk | contribs) (Added Common Lisp.) |
m (→{{header|Fortran}}: lang tag) |
||
Line 162: | Line 162: | ||
=={{header|Fortran}}== |
=={{header|Fortran}}== |
||
{{works with|Fortran|90 and later}} |
{{works with|Fortran|90 and later}} |
||
<lang fortran> FUNCTION isPerfect(n) |
|||
LOGICAL :: isPerfect |
LOGICAL :: isPerfect |
||
INTEGER, INTENT(IN) :: n |
INTEGER, INTENT(IN) :: n |
||
Line 173: | Line 173: | ||
END DO |
END DO |
||
IF (factorsum == n) isPerfect = .TRUE. |
IF (factorsum == n) isPerfect = .TRUE. |
||
END FUNCTION isPerfect |
END FUNCTION isPerfect</lang> |
||
=={{header|Haskell}}== |
=={{header|Haskell}}== |