#include "Matrix.h"
#include
#include
using namespace std;
int main(){
int r1, c1, r2, c2;
double num;
while(cin >> r1 >> c1){
vector coef1, coef2;
for(int i=0; i> num;
coef1.push_back(num);
}
Matrix m1(r1, c1, coef1);
cin >> r2 >> c2;
for(int i=0; i> num;
coef2.push_back(num);
}
Matrix m2(r2, c2, coef2);
if(m1.isAddable(m2)){
Matrix res = m1+m2;
cout << "m1 + m2=" << endl;
res();
}else{
cout << "m1 and m2 are not addable." << endl;
}
if(m1.isSubstractable(m2)){
Matrix res = m1-m2;
cout << "m1 - m2=" << endl;
res();
}else{
cout << "m1 and m2 are not substractable." << endl;
}
if(m1.isMultipliable(m2)){
Matrix res = m1*m2;
cout << "m1 * m2=" << endl;
res();
}else{
cout << "m1 and m2 are not multipliable." << endl;
}
}
return 0;
}