Sum of all submatrices

the code is showing errors…#include<bits/stdc++.h>
using namespace std;

int sumofsubmatrix(int **arr,int n,int m)
{
int sum=0;

for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
sum+= arr[i][j][(i+1)(j+1)(n-i)(m-j)];
}
}
return sum;
}
int main(int argc,char const *argv[])
{
int n,int m;
cin>>n>>m;

int *arr = new int[n];
for(int i=0;i<n;i++)
{
arr[i] = =new int[m];
}

for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
cin>>arr[i][j];
}
}
cout<<sumofsubmatrix(arr,n,m)<<endl;
return 0;
}

THIS IS THE CODE…HELP ME SOLVING…

Please save your code on ide.codingblocks.com and share its link.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.