Compare commits

..
1 Commits
Author SHA1 Message Date
PC de clase de0900d1d2 solucion que le gusta a pilar 2026-10-30 10:39:26 +01:00
+8 -4
View File
@@ -7,13 +7,17 @@ public class P481_Ajedrez {
public static void main(String[] args) { public static void main(String[] args) {
Scanner sc = new Scanner(System.in); Scanner sc = new Scanner(System.in);
int h = 0, v = 0; int h = 0, v = 0;
boolean detener = false;
do { do {
h = sc.nextInt(); h = sc.nextInt();
v = sc.nextInt(); v = sc.nextInt();
if (h == 0 && v == 0) break; if (h == 0 && v == 0) {
char letra = (char) ((8 - h) + (int) ('a')); detener = true;
System.out.printf("%c%d\n", letra, v); } else {
} while (true); char letra = (char) ((8 - h) + (int) ('a'));
System.out.printf("%c%d\n", letra, v);
}
} while (!detener);
sc.close(); sc.close();
} }
} }