Browse Source

Update src/main/c/Template/Battleship_game.c

remotes/origin/Battleship_game
fdai7729 11 months ago
parent
commit
733d234169
  1. 14
      src/main/c/Template/Battleship_game.c

14
src/main/c/Template/Battleship_game.c

@ -3,9 +3,23 @@
int feld(char prifield[]) { int feld(char prifield[]) {
int a = 0; 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++) { for (int i = 0; i <= 9; i++) {
printf("%c-", letcoor[i]);
for (int j = 0; j <= 9; j++) { for (int j = 0; j <= 9; j++) {
printf("%c", prifield[a]); printf("%c", prifield[a]);
a++; a++;

Loading…
Cancel
Save