-
-
Save parzibyte/58fd2dc935d58c59ae1819c2b964456a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Después imprimir los encabezados | |
System.out.println("\t\t\t1\t\t\t\t\t2\t\t\t\tSuma"); | |
for (int x = 0; x < 62; x++) { | |
System.out.print("_"); | |
} | |
System.out.println(); | |
// Finalmente imprimir los resultados | |
for (int y = 0; y < matriz1.length; y++) { | |
for (int x = 0; x < matriz1[y].length; x++) { | |
System.out.printf("%5d ", matriz1[y][x]); | |
} | |
System.out.print(" | "); | |
for (int x = 0; x < matriz2[y].length; x++) { | |
System.out.printf("%5d ", matriz2[y][x]); | |
} | |
System.out.print(" | "); | |
for (int x = 0; x < matrizSuma[y].length; x++) { | |
System.out.printf("%5d ", matrizSuma[y][x]); | |
} | |
System.out.print(" | "); | |
System.out.println(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment