Having a problem in this piece of code particularily and the same in some others of your loops:
for(int i=1 ; i<=2 ; i++)
{
cout<<"Enter zaraib moadele " << i<<" : "<<endl;
for(int j=1 ; j<=2 ; j++)
cin>>matzarb[i][j];
}
You are running out of ranges. C++ indexes are zero based, so in this piece of code you are running from index 2 to 3
Correct solution is to be zero based
for(int i = 0 ; i < 2 ; i++) {
cout<<"Enter zaraib moadele " << (i + 1)<<" : "<<endl;
for(int j = 0 ; j < 2 ; j++)
cin>>matzarb[i][j];
}
Do it in all your loops.