import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
private static double[][] matriz = new double[3][3];
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
for (int x = 0; x < matriz.length; x++) {
for (int y = 0; y < matriz[x].length; y++) {
System.out.println("Intro valor " + x + ", " + y);
matriz[x][y] = Double.parseDouble(br.readLine());
}
}
visualizar();
}
private static void visualizar() {
for (double[] doubles : matriz) {
System.out.format("%.1f %.1f %.1f%n", doubles[0], doubles[1], doubles[2]);
}
}
}
[/aux_code]
Matriz 3×3
con
No hay comentarios
[aux_code language=»javascript» theme=»tomorrow» title=»Matriz 3×3″ extra_classes=»»]