All subarrays not being printed

#include
using namespace std;
int main(){
int n,arr[10][10];
cin>>n;

int i,j,li,lj,bi,bj;

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

for(li=0;li<n;li++){
	for(lj=0;lj<n;lj++){
		for(bi=li;bi<n;bi++){
			for(bj=li;bj<n;bj++){
				for(i=li;i<=bi;i++){
					for(j=lj;j<=bj;j++){
						cout<<arr[i][j]<<" ";
					}
				}
				cout<<endl;
			}
		}
	}
}

}

for(li=0;li<n;li++){
for(lj=0;lj<n;lj++){
for(bi=li;bi<n;bi++){
for(bj=li;bj<n;bj++){
for(i=li;i<=bi;i++){
for(j=lj;j<=bj;j++){
cout<<arr[i][j]<<" ";
}
}
cout<<endl;
}
}
}
}

in the highlighted line bj should start from tj

yeah… thank you sir