#include #include #include "Matrix.h" using namespace std; int main() { cout << "Enter dimensions of matrix (rows, columns):" << endl; int m, n; cin >> m >> n; Matrix a(m, n); cout << "Enter matrix elements:" << endl; cin >> a; cout << "Initial matrix:" << endl; cout << fixed << setprecision(4); cout << a; Matrix a0 = a; int rank = a.gauss(); cout << "Rank of matrix = " << rank << endl; cout << "Echelonized form of matrix:" << endl; cout << a; if (a.rows() == a.cols()) cout << "Determinant = " << a.det() << endl; cout << "Reduced row echelon form of matrix:" << endl; Matrix aReduced = a0; aReduced.rref(); cout << aReduced; return 0; }