You are viewing a single comment's thread. Return to all comments →
My solution
int divisors_sum = n; for(int i = 1 ; i <= n/2 ; i++){ if(n % i == 0) divisors_sum += i; } return divisors_sum;
Day 19: Interfaces
You are viewing a single comment's thread. Return to all comments →
My solution