Copio el codigo y una cita de lo que pasa al ejecutarlo.
Código:
#include <stdio.h>
int main()
{
char names[ ] = {};
int counter;
char input[100];
int i;
int quit;
for (counter=0; counter<10; counter +=1)
{
printf("Enter a name: ");
gets(names);
}
while (quit!=1)
{
printf("Enter a name to see if it is on DB: ");
gets(input);
for (i=0; i<10; i++)
{
if (names[i]==input)
{
printf("One match in DB");
}
if (names[i]!=input)
{
printf("No match in DB");
}
}
printf("Enter number one to exit and two to continue: ");
scanf("%d", &quit);
}
return 0;
}
Citar
Enter a name: Esteban
Enter a name to see if it is on DB: Esteban
No match in DBNo match in DBNo match in DBNo match in DBNo match in DBNo match in DBNo match in DBNo match in DBNo match in DBNo match in DBEnter number one to exit and two to continue: 1
Enter a name to see if it is on DB: Esteban
No match in DBNo match in DBNo match in DBNo match in DBNo match in DBNo match in DBNo match in DBNo match in DBNo match in DBNo match in DBEnter number one to exit and two to continue: 1
Aclaro que el nombre Esteban y el 1 es el ingreso de datos.
Si me ponen en el camino correcto, muy agradecido.