Professional Documents
Culture Documents
Calculadora Matriz Completa
Calculadora Matriz Completa
int main()
{
int opcion;
do{
menu();
cin >> opcion;
if( cin.fail() || cin.bad() ){
opcion = 0;
cin.clear();
cin.ignore( '\n', 80 );
}
switch( opcion ){
case 1:
sumaMatrices();
break;
case 2:
restaMatrices();
break;
case 3:
multiplicacionMatrices();
break;
case 4:
matrizInversa();
break;
case 5:
matrizTranspuesta();
break;
case 6:
matrizAdjunta();
break;
case 7:
cout << "\n\nFIN DEL PROGRAMA\n\n";
break;
default:
cout << "\n\nOPCION NO VALIDA\n\n";
break;
}
}while( opcion != 7 );
}
void sumaMatrices()
{
int fil, col;
void restaMatrices()
{
int fil, col;
cout << "\nLAS MATRICES DEBEN TENER LA MISMA DIMENSION\n"
<< "\nDimension de la matriz:";
cout << "\nFilas de la matriz: "; cin >> fil;
cout << "Columnas de la matriz: "; cin >> col;
void multiplicacionMatrices()
{
int filA, colA, filB, colB;
}else
cout << "\n NO SE PUEDEN MULTIPLICAR"
<< "\n EL NUMERO DE COLUMNAS DE LA MATRIZ A"
<< "\nDEBE COINCIDIR CON EL DE FILAS DE LA MATRI B";
void matrizInversa()
{
void matrizTranspuesta()
{
void matrizAdjunta()
{
void menu()
{
cout << "\n CALCULADORA DE MATRICES"
<< "\n============================================"
<< "\n1.- Suma de Matrices ............. (Pulsa 1)"
<< "\n2.- Resta de Matrices ............ (Pulsa 2)"
<< "\n3.- Multiplicacion de Matrices ... (Pulsa 3)"
<< "\n4.- Matriz Inversa ............... (Pulsa 4)"
<< "\n5.- Matriz Transpuesta ........... (Pulsa 5)"
<< "\n6.- Matriz Adjunta ............... (Pulsa 6)"
<< "\n7.- Terminar ..................... (Pulsa 7)"
<< "\n============================================"
<< "\nSELECCIONA UNA OPCION (1 - 7): ";