Compare commits
1
Commits
d689f80fbc
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de0900d1d2 |
@@ -7,13 +7,17 @@ public class P481_Ajedrez {
|
||||
public static void main(String[] args) {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
int h = 0, v = 0;
|
||||
boolean detener = false;
|
||||
do {
|
||||
h = sc.nextInt();
|
||||
v = sc.nextInt();
|
||||
if (h == 0 && v == 0) break;
|
||||
char letra = (char) ((8 - h) + (int) ('a'));
|
||||
System.out.printf("%c%d\n", letra, v);
|
||||
} while (true);
|
||||
if (h == 0 && v == 0) {
|
||||
detener = true;
|
||||
} else {
|
||||
char letra = (char) ((8 - h) + (int) ('a'));
|
||||
System.out.printf("%c%d\n", letra, v);
|
||||
}
|
||||
} while (!detener);
|
||||
sc.close();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user