• + 0 comments

    My submission in C++

    int divisorSum(int n) {
            int i;
            int temp = 0;
            for(i = 1; i <= n; i++){
                if(n % i == 0){
                    temp += i;
                }
            }
            return temp;
        }