This file contains hidden or 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
| import java.util.Scanner; | |
| public class laberinto { | |
| private static Scanner sc = new Scanner(System.in); | |
| /** | |
| * Este método se encarga de pintar el tablero inicial y registrar el movimiento introducido por el usuario. | |
| * | |
| * @return movimiento |
This file contains hidden or 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
| import java.util.Arrays; | |
| import java.util.Scanner; | |
| public class bucaMinas { | |
| private static Scanner sc = new Scanner(System.in); | |
| private static final int CASILLAS_FACIL = 10; | |
| private static final int CASILLAS_MODERADO = 16; | |
| private static final int CASILLAS_DIFICIL = 22; | |
| private static final int CASILLAS_IMPOSIBLE = 26; |
This file contains hidden or 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
| import java.util.Scanner; | |
| public class bucaMinas { | |
| private static Scanner sc = new Scanner(System.in); | |
| private static final int CASILLAS_FACIL = 10; | |
| private static final int CASILLAS_MODERADO = 16; | |
| private static final int CASILLAS_DIFICIL = 22; | |
| private static final int CASILLAS_IMPOSIBLE = 26; |
This file contains hidden or 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
| public class ejercicio1 { | |
| public static void main(String[] args) { | |
| /* | |
| Tenemos estas matrices dada en el ejercicio con las cuales deberemos hacer todos los cálculos y procedimientos correspondientes. | |
| */ | |
| String[] estado = {"Alabama", "Alaska", "Arizona", "Arkansas", "California", "Carolina del Norte", "Carolina del Sur", "Colorado", "Connecticut", "Dakota del Norte", "Dakota del Sur", "Delaware", | |
| "Distrito de Columbia", "Florida", "Georgia", "Hawái", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Luisiana", "Maine", "Maryland", "Massachusetts", "Míchigan", |
This file contains hidden or 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
| import java.util.Scanner; | |
| public class bucaMinas { | |
| private static Scanner sc = new Scanner(System.in); | |
| private static final int CASILLAS_FACIL = 10; | |
| private static final int CASILLAS_MODERADO = 16; | |
| private static final int CASILLAS_DIFICIL = 22; | |
| private static final int CASILLAS_IMPOSIBLE = 26; |
This file contains hidden or 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
| public class ejercicio1 { | |
| public static void main(String[] args) { | |
| /* | |
| Tenemos estas matrices dada en el ejercicio con las cuales deberemos hacer todos los cálculos y procedimientos correspondientes. | |
| */ | |
| String[] estado = {"Alabama", "Alaska", "Arizona", "Arkansas", "California", "Carolina del Norte", "Carolina del Sur", "Colorado", "Connecticut", "Dakota del Norte", "Dakota del Sur", "Delaware", | |
| "Distrito de Columbia", "Florida", "Georgia", "Hawái", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Luisiana", "Maine", "Maryland", "Massachusetts", "Míchigan", |
This file contains hidden or 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
| package relación_ejercicios_3_Arrays; | |
| public class ejercicio11_4_4 { | |
| private static boolean matrizInversa(int[][] matriz1, int[][] matriz2) { | |
| boolean inversa = true; | |
| for (int j = 0; j < matriz1.length && inversa; j++) { | |
| for (int i = 0; i < matriz1[j].length && inversa; i++) { | |
| if (matriz1[j][i] != matriz2[matriz2.length - 1 - j][matriz2[0].length - 1 - i]) { |
This file contains hidden or 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
| package Boletgin_Matrices; | |
| public class ejercicio9_4_4 { | |
| private static boolean simetricaX(int[][] matriX) { | |
| //Declaramos una variable booleana la cual devolveremos con la respuesta. | |
| boolean simetrica = true; | |
| /* | |
| Aquí estamos creando un for que recorre hasta la mitad de las filas. |
This file contains hidden or 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
| package Boletgin_Matrices; | |
| public class ejercicio10_4_4 { | |
| private static boolean simetricaX(int[][] matrix) { | |
| boolean simetrica = true; | |
| for (int i = 0 ; i < matrix[0].length/2 && simetrica ; i++) { |
This file contains hidden or 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
| package relación_ejercicios_3_Arrays; | |
| public class ejercicio6_4_4 { | |
| public static void main(String[] args) { | |
| int[][] verificar = {{2, 4, 5, 6, 9}, {4, 2, 6, 7, 9}}; | |
| for (int i = verificar[0].length - 1; i >= 0; i--){ | |
| for (int j = verificar.length -1 ; j >= 0; j--){ | |
| System.out.print(" " + verificar[j][i]); | |
| } |
NewerOlder