Abundant, deficient and perfect number classifications: Difference between revisions
Content added Content deleted
m (→version 1: align whitespace in a comment.) |
|||
Line 689: | Line 689: | ||
if x//j==0 then s=s+j+ x%j /*add the two divisors to the sum*/ |
if x//j==0 then s=s+j+ x%j /*add the two divisors to the sum*/ |
||
end /*j*/ /* [↑] % is REXX integer divide*/ |
end /*j*/ /* [↑] % is REXX integer divide*/ |
||
/* [↓] adjust for square. |
/* [↓] adjust for square. _ */ |
||
if j*j==x then s=s+j /*Was X a square? If so, add √x.*/ |
if j*j==x then s=s+j /*Was X a square? If so, add √x.*/ |
||
return s /*return the sum of the divisors.*/</lang> |
return s /*return the sum of the divisors.*/</lang> |