Please check why my code isnt working?

#include
using namespace std;

int main(){
int a[1000][1000];
int n,flag;
cin>>n;

for(int i=0;i<n;i++){
	for(int j=0;j<n;j++){
		cin>>a[i][j];
	}
}

int li,lj,bi,bj;
int sum=0;

for(li=0;li<n;li++){
	for(lj=0;lj<n;lj++){
        // cout<<a[li][lj]<<"->";    
        //   cout<<endl;   
                    

		for(bi=li;bi<n;bi++){
	        for(bj=lj;bj<n;bj++){
                // cout<<a[bi][bj]<<","; 
               

	        	for(int i=li;i<bi;i++){
	                for(int j=lj;j<bj;j++){
	                	sum+=a[i][j];
                        // cout<<a[i][j]<<",";
                    cout<<sum;
                    }
                }
               cout<<endl;

		    }
        }

	}
}

return 0;

}

Please share the link of Code

How to Share Link of Code??

  1. paste your code at https://ide.codingblocks.com/

  2. click->file->save

  3. after a link will be generated at top in place of url something like: https://ide.codingblocks.com/s/12345

  4. share this link

i have done some modifications
you can see them in code below

if you have doubt feel free to ask