//Montante algorithm, implemented by Tigrux #include #include using namespace std; const int MAX= 3; const int ROWS= MAX; const int COLS= MAX; typedef long T; void Montante(T A[ROWS][COLS],T B[ROWS][COLS] ); void imprimeMatriz(T A[ROWS][COLS]); int main() { T A[ROWS][COLS]= { {3, 9, 5}, {1, 5,10}, {2,-3,-1}, }; T B[ROWS][COLS]= { {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, }; cout << "Matriz original"<< endl; imprimeMatriz(A); Montante(A,B); cout << "Matriz reducida" << endl; imprimeMatriz(A); cout << "El valor del determinante es " << A[0][0] << endl; cout << "Matriz adjunta" << endl; imprimeMatriz(B); return 0; } void Montante(T A[ROWS][COLS],T B[ROWS][COLS] ) { int i,j; T PivAnt=1,PivAct; for(int k=0;k