/* Program 4 - password program with more requirements -build a database of names and passwords (3 of them) -password must 1) have length >= 6 2) >= 1 uppercase character 3) >= 1 lowercase character 4) >= 1 digit 5) >= 1 special character (punctuation) 6) no spaces 7) start with an alphabetical character -give user three chances to input name and password correctly */ #include #include #include #include #define N 50 #define NUM 3 int isValidPassword(char password[]) { int i; int upper=0, lower=0, digit=0, punct=0, space=0; if(strlen(password)<6) return 0; if(!isalpha(password[0])) return 0; for(i=0; i0 && lower > 0 && punct > 0 && digit > 0) return 1; return 0; } 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