Created
August 2, 2019 19:02
-
-
Save parzibyte/014506ed4c4f7e0aa78793b8845e4246 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void imprimir(void) { | |
// Un simple encabezado, no hay que confundirse | |
char guiones[] = "--------------------"; | |
printf("+%s+%s+\n", guiones, guiones); | |
printf("|%-20s|%-20s|\n", "PALABRA", "FRECUENCIA"); | |
printf("+%s+%s+\n", guiones, guiones); | |
// A partir de aquí el código sí importa; simplemente recorremos la pila | |
struct nodo *temporal = superior; | |
while (temporal != NULL) { | |
printf("|%-20s|%-20d|\n", temporal->detalleDePalabra.palabra, | |
temporal->detalleDePalabra.frecuencia); | |
temporal = temporal->siguiente; | |
} | |
// El pie | |
printf("+%s+%s+\n", guiones, guiones); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment