Abundant Numbers/C++ : I have been trying to generate all the abundant numbers . But I am getting a blank screen as output? I am putting all the numbers that are abundant in an array and then printing the array.But its not showing anything ? Why?
`       #include <iostream>

    using namespace std;

    int main()
    {
    int arr[28123];
    int sum = 0,k=0;
    for(int i = 1;i<28123;i++){
        for(int j= 1;j<i;j++){
            if(i%j==0){
                sum = sum + j;
                //cout<<sum<<endl;
            }
        }
        if(sum == i){
            arr[k] = i;
            cout<<i<<endl;
            k++;
        }
    }
    for(int y = k;y<28123;y++){
        arr[y] = 0;
    }
    int n = sizeof(arr)/sizeof(arr[0]);
    for(int h= 0;h<k;h++){
    cout <<arr[h]<< endl;
    }
    return 0;
}
`