SumOfSubmatrix problem

Mine Code is not working

At line 21 make it int **arr=new int*[n];
At line 31 make it cin>>arr[i][j];
At line 34 pass the function properly.