#include <iomanip>
#include <string>
#include <cmath>
#include <fstream>
using namespace std;
int cant_variables=0;
int cant_ecuaciones;
void Sist_ecuaciones();
float **CrearMatriz(int filas, int columnas);
void imprimir_matriz(float **matriz, int fila, int columnas);
int longitud(float valor);
void op_filas_1(float **matriz, int fila, float k, int columnas);
void op_filas_2(float **matriz, int fila1, int fila2, float k, int columnas);
void op_filas_3(float **matriz, int fila1, int fila2, int columnas);
void sistema_resolvente(float **matriz, int filas, int columnas);
int main(){
cout << " BIENVENIDO AL ASISTENTE DE RESOLUCION DE ECUACIONES LINEALES POR M
ATRICES V0.1\n\n";
char opc;
int control = 1;
while(control){
switch(control){
case 1:
cout << " Elija una opcion: \n"
<< "\t A.Ingresar sistema de ecuaciones lineales. \n"
<< "\t B.Calcular A^(-1) de A que se ingreso la ultima vez.
\n"
<< " Opcion que desea: ";
cin >> opc;
cout << endl;
switch(opc){
case 'A':
case 'a':
control = 2;
Sist_ecuaciones();
break;
default:
cout << " La opcion elegida no es correcta. Intente nuev
amente. \n\n";
}
break;
case 2:
cout << "\n Desea realizar otra operacion?(S/N)";
cin >> opc;
switch(opc){
case 'S':
case 's':
control = 1;
break;
case 'N':
case 'n':
cout << "\n\n Programa codificado por FRANCO SABBATINI y
DENIS LORENZON. Licencia tipo GPL. \n\n";
control = 0;
break;
default:
cout << " La opcion elegida no es correcta. Intente nuev
amente. \n\n";
}
break;
}
}
system("PAUSE");
return 0;
}
void Sist_ecuaciones(){
cout << " Cuantas variables (Xn) posee su sistema de ecuaciones lineales? "
;
cin >> cant_variables;
cant_variables++; //suma 1 para terminos independientes
cout << " Cuantas ecuaciones lineales posee su sistema ";
cin >> cant_ecuaciones;