#include #include using namespace std; class matr { int **ms; int x, y; public: matr (int); friend void matr_read (matr &); friend void matr_print (matr &); matr operator& (matr); matr operator+ (matr); matr (matr &); }; matr :: matr (int std_size=10) { ms = new int*[std_size]; for (int i=0; i> mtr.x; cout << "Enter width: " ; cin >> mtr.y; cout << "Enter data :"<< endl; for (int i = 0; i < mtr.x; i ++) for (int j = 0; j < mtr.y; j ++) cin >> mtr.ms[i][j]; } void main() { matr m1, m2, m3; cout << "Enter matrix 1" << endl; matr_read(m1); cout << "Enter matrix 2" << endl; matr_read(m2); m3=m1+m2; cout << "Matrix 1 + matrix 2 ="; matr_print(m3); cout << "Matrix 1 * matrix 2 ="; m3=m1&m2; matr_print(m3); system ("pause"); }