We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5620ca commit 0bf3790Copy full SHA for 0bf3790
Unit05/src/unit05/Actividad12/Actividad12.java
@@ -0,0 +1,24 @@
1
+package unit05.Actividad12;
2
+
3
+/*
4
+ Crear una tabla bidimensional de longitud 5 x 5 y rellenarla de la siguiente forma: el
5
+ elemento de la posición [n][m] debe contener el valor 10 * n + m. Después se debe mostrar su
6
+ contenido.
7
+ */
8
9
+public class Actividad12 {
10
+ public static void main(String[] args) {
11
+ int[][] tabla = new int[5][5];
12
+ for (int i = 0; i < tabla.length; i++) {
13
+ for (int j = 0; j < tabla.length; j++) {
14
+ tabla[i][j] = 10*i+j;
15
+ }
16
17
+ for (int[] fila:tabla) {
18
+ for (int valor:fila) {
19
+ System.out.print(valor+" ");
20
21
+ System.out.println();
22
23
24
+}
0 commit comments