Solution not clear

whats wrong in my code

hello @ajayrajsingh_817
pls share ur code…

#include using namespace std; int main() { int i,j,li,lj,bi,bj,m,n; cin>>n>>m; int a[n][m]; for(i=0;i<n;i++) { for(j=0;j<m;j++) { cin>>a[i][j]; } } for(i=0;i<n;i++) { for(j=0;j<m;j++) { cout<<a[i][j]<<" "; } cout<<endl; } int sum=0; for(li=0;li<=n-1;li++) { for(lj=0;lj<=m-1;lj++) { for(bi=li+1;bi<=n-1;bi++) { for(bj=lj+1;bj<=m-1;bj++) { for(i=li;i<=bi;i++) { for(j=lj;j<=bj;j++) { sum=sum+a[i][j]; } } } } } } cout<<sum; }

it gives wrong answer

save it here -> https://ide.codingblocks.com/
and then share the generated link

@ajayrajsingh_817
use cb ide for code sharing.

can u reply fast n solve my doubt

did u check my previous responses,i m asking u to save ur code on cb ide and then share code.

i have share my code with you in chat box
kindly check

i have replied to ur chat box pls check