# Написание программы, демонстрирующей работу с классом, страница 4

cout<<"5: Testing for equality"<<endl;//проверка на равенство

cout<<"6: Calculating the inverse matrix"<<endl;//обратная матрица

cout<<"7: The calculation of the transposed matrix"<<endl;//транспонированая матрица

cout<<"8: Involution"<<endl;//возведение в степень

cout<<"9: Calculation of the determinant"<<endl;//вычисление детерминанты

cout<<"10: Calculation of the norm"<<endl;//вычисление нормы

cout<<"11: Matrix type"<<endl;//тип матрицы

cout<<"12: Exit"<<endl;//выход

cout<<"Select an action: ";

cin>>s;

cout<<"___________________________"<<endl;

if (s=="1"){

TMatr c;

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.r==b.r && a.c==b.c){

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();

} else{

cout<<"ERROR!Matrix can't be stacked "<<endl;

}

}else if (s=="2"){

cout<<"Subtraction of matrices"<<endl;

TMatr c;

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.r==b.r && a.c==b.c){

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();

} else{

cout<<"ERROR!Matrix can't be deducted "<<endl;

}

}else if (s=="3"){

cout<<"Multiplication of matrices"<<endl;

TMatr c;

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){