| about | help | done | prefs | create account |
sumFactors
| Given a positive integer n, compute the sum of all the divisors of n. For example, if n were 12, you'd return 28 since that is the sum 1 + 2 + 3 + 4 + 6 + 12.
sumFactors(12) → 28 sumFactors(6) → 12 sumFactors(28) → 56 ...Save, Compile, Run See also Java Example Code. Java help docs: If Boolean Logic | Strings | While and For Loops | Arrays and Loops
|
Forget It! -- delete my code for this problem 220
Copyright Nick Parlante 2006-10 - privacy