/* Program 2 - Login program: -build a database of names and passwords (3 of them) -password accepted when length >= 6 -give user three chances to input name and password correctly */ #include #include #include #define N 50 #define NUM 3 void main() { char names[NUM][N]; char pws[NUM][N]; char pwguess[50]; char nameguess[50]; int i, j; printf("Enter %d names in the format\tname password\n", NUM); for(i=0; i= 6!\n"); printf("enter name and password %d: ", i); scanf("%s%s", names[i], pws[i]); } } printf("\nDatabase of usernames and passwords built!\n\n\n"); for(j=0; j<3; j++) { printf("Enter your name and password: ", nameguess); scanf("%s%s", nameguess, pwguess); for(i=0; i