Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) throws IOException {
- InputStreamReader flujo = new InputStreamReader(System.in);
- BufferedReader teclado = new BufferedReader(flujo);
- String auxS = "";
- String elementos[][] = new String[2][2];
- for (int i = 0; i < elementos.length; i++) {
- for (int j = 0; j < elementos[i].length; j++) {
- System.out.println("Estado");
- auxS = teclado.readLine();
- elementos[i][j] = auxS;
- System.out.println("Elemento");
- auxS = teclado.readLine();
- elementos[i][j] = auxS;
- }
- }
- for( int x = 0; x<elementos.length;x++) {
- for( int z = 0; z<elementos.length;z++) {
- System.out.println("Estado "+elementos[x][z]);
- System.out.println("Elemento "+elementos[z][z]);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment