Created
August 31, 2016 02:14
-
-
Save MauricioDinki/6effcea02b0953439b05c0c6b135cd68 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
#include "stdio.h" | |
#include "stdlib.h" | |
#include "string.h" | |
// Atraves de la tecnica de la burbuja | |
int main(int argc, char const *argv[]) { | |
char busqueda[30]; | |
printf("Ingresa la palabra a buscar \n"); | |
scanf("%s", &busqueda); | |
printf("---------------------- \n"); | |
char nombres[6][30] = { | |
"Puyol", "Kaka", "Roberto Carlos", "Cristiano", "Messi", "Villa" | |
}; | |
for (int i = 0; i < 6; i++) { | |
printf("%s \n", busqueda); | |
printf("%s \n", nombres[i] ); | |
if (strcmp(busqueda,nombres[i]) == 0) { | |
printf("Si lo encontre \n"); | |
} else { | |
printf("No lo encontre \n"); | |
} | |
printf("-------------------------- \n"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment