You are viewing a single comment's thread. Return to all comments →
Here my java solution
public int divisorSum(int n) { int divisor; int sum = 0; for(int i=1; i<=n;i++) { if(n%i == 0) { divisor = n/i; sum += divisor; } }
return sum; }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 19: Interfaces
You are viewing a single comment's thread. Return to all comments →
Here my java solution