cout<<"Fill the first matrix"<<endl;
a.set();
cout<<"___________________________"<<endl;
a.Info();
cout<<"Fill the second matrix"<<endl;
b.set();
cout<<"___________________________"<<endl;
b.Info();
c=a*b;
cout<<"Result:"<<endl;
c.Info();
menu();
} else{
cout<<"ERROR!Matrix can't be multiplied "<<endl;
menu();
}
}else if (s=="4"){
cout<<"Division of matrices"<<endl;
TMatr c,q;
int cc,cr,cc2,cr2;
cout<<"Enter count of columns and rows of the first matrix"<<endl;
cin>>cc>>cr;
TMatr a(cc,cr);
cout<<"Enter count of columns and rows of the second matrix"<<endl;
cin>>cc2>>cr2;
TMatr b(cc2,cr2);
if (a.c==b.r){
cout<<"Fill the first matrix"<<endl;
a.set();
cout<<"___________________________"<<endl;
a.Info();
cout<<"Fill the second matrix"<<endl;
b.set();
cout<<"___________________________"<<endl;
b.Info();
c=a/b;
cout<<"Result:"<<endl;
c.Info();
menu();
} else{
cout<<"ERROR!Matrix can't be separated "<<endl;
menu();
}
}else if (s=="5"){
cout<<"Testing for equality"<<endl;
int cc,cr,cc2,cr2;
cout<<"Enter count of columns and rows of the first matrix"<<endl;
cin>>cc>>cr;
TMatr a(cc,cr);
cout<<"Enter count of columns and rows of the second matrix"<<endl;
cin>>cc2>>cr2;
TMatr b(cc2,cr2);
if (a.c==b.r){
cout<<"Fill the first matrix"<<endl;
a.set();
cout<<"___________________________"<<endl;
a.Info();
cout<<"Fill the second matrix"<<endl;
b.set();
cout<<"___________________________"<<endl;
b.Info();
if (a==b){
cout<<"a=b"<<endl;
menu();
}else{
cout<<"a!=b"<<endl;
menu();
}
} else{
cout<<"a!=b"<<endl;
menu();
}
}else if (s=="6"){
cout<<"Calculating the inverse matrix"<<endl;
int cc,cr;
cout<<"Enter count of columns and rows of the matrix"<<endl;
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.