Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 19, 2021 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/dd1c81e42f328ac7afaa480af7987b2a to your computer and use it in GitHub Desktop.
Save parzibyte/dd1c81e42f328ac7afaa480af7987b2a to your computer and use it in GitHub Desktop.
void imprimir_bosque(char bosque[medidaGlobalBosque][medidaGlobalBosque]) {
int contador = 0;
// Un separador
printf("\n\n");
while (contador < medidaGlobalBosque) {
printf("_____");
contador++;
}
printf("\n");
// Letras
printf("| ");
char c = 'A';
contador = 0;
while (contador < medidaGlobalBosque) {
printf("| %c ", c);
c++;
contador++;
}
printf("|\n");
for (int y = 0; y < medidaGlobalBosque; y++) {
printf("| %d |", y + 1);
for (int x = 0; x < medidaGlobalBosque; x++) {
printf(" %c |", bosque[y][x]);
}
printf("\n");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment