From 733d234169258c99d31a8daf1e091c12100dde89 Mon Sep 17 00:00:00 2001 From: fdai7729 Date: Fri, 2 Feb 2024 17:48:52 +0000 Subject: [PATCH] Update src/main/c/Template/Battleship_game.c --- src/main/c/Template/Battleship_game.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/c/Template/Battleship_game.c b/src/main/c/Template/Battleship_game.c index 0bdf810..9524763 100644 --- a/src/main/c/Template/Battleship_game.c +++ b/src/main/c/Template/Battleship_game.c @@ -3,9 +3,23 @@ int feld(char prifield[]) { int a = 0; + int numcoor[10]; + char letcoor[10] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J' }; + + printf("--"); + + for (int k = 0; k <= 9; k++) { + numcoor[k] = k + 1; + printf("%d", numcoor[k]); + } + + printf("\n"); + for (int i = 0; i <= 9; i++) { + printf("%c-", letcoor[i]); + for (int j = 0; j <= 9; j++) { printf("%c", prifield[a]); a++;