class operaciones_matrices
{
static void
mostrar (int a [] [], int n, int m)
{ int i, j;
for (i = 1 ; i
<= m ; i++)
{
for (j = 1
; j <= n ; j++)
System.out.print (a [i] [j] + " ");
System.out.println
();
}
}
static void leer
(int a [] [], int n, int m)
{ int i, j;
for (i = 1 ; i
<= m ; i++)
{
for (j = 1
; j <= n ; j++)
a [i]
[j] = Leer.datoInt ();
}
}
static void
transpuesta (int a [] [], int n, int m)
{ int i, j;
for (i = 1 ; i
<= m ; i++)
{
for (j = 1
; j <= n ; j++)
System.out.print (a [j] [i] + " ");
System.out.println
();
}
}
public static void
main (String [] args)
{ int i, j, k, l, m = 0, n = 0, opc;
int a [] [] =
new int [50] [50];
int b [] [] = new int [50] [50];
System.out.println
("Introduzca el valor de n :");
n
= Leer.datoInt ();
System.out.println
("Introduzca el valor de m :");
m
= Leer.datoInt ();
System.out.println ("Introduciendo los valores de la matriz
A");
leer (a, n, m);
System.out.println ("Introduciendo los valores de la matriz
B");
leer (b, n, m);
System.out.println ("matriz A");
mostrar (a, n, m);
System.out.println ("matriz B");
mostrar (b, n, m);
break;
System.out.println ("Matriz
A");
mostrar (a, n, m);
System.out.println ("Matriz Transpuesta de A");
transpuesta (a, n, m);
System.out.println ("Matriz
B");
mostrar (b, n, m);
System.out.println ("Matriz Transpuesta de B");
transpuesta (b, n, m);
}
}