Main.cc: In function 'int main()':
Main.cc:15:15: error: 'i' was not declared in this scope
if(i==n)cin>>a[m][j];
^
Main.cc:15:30: error: 'j' was not declared in this scope
if(i==n)cin>>a[m][j];
^
Main.cc:16:35: error: 'j' was not declared in this scope
else if(i==m)cin>>a[n][j];
^
Main.cc:17:27: error: 'j' was not declared in this scope
else cin>>a[i][j];
^