#include #include using namespace std; bool strong_pass(char[], int); int main() { const int size = 30; //allowing the user to enter a relatively bigger password char password[size]; char go; //Function call do { cout << "Please enter a password " <> go; //Input validation while(toupper(go) != 'Y' && toupper(go) != 'N') { cout <<"Invalid input. Enter either Y or N " << endl; cin >> go; } }while (toupper(go) == 'Y'); return 0; } bool strong_pass(char userinput[], int maxmin) { bool E = false; //size validation bool A = false; if(strlen(userinput)>= 8 && strlen(userinput) <= 10) A = true; bool B = false; int count = 0; char binga; while(userinput[count]) { binga = userinput[count]; //deosn't really utilize the logical Or operation if(isupper(binga)) //maybe the first occurence of an uppercase letter should be enough B = true; count++; } //testing for a lower case character bool C = false; int index = 0; char terminator; while(userinput[index]) { terminator = userinput[index]; if(islower(terminator)) C = true; index++; } //testing for a digit or a numeric input in the password bool D = false; int punter = 0; char mcgrath; while(userinput[punter]) { mcgrath = userinput[punter]; if(isdigit(mcgrath)) D = true; punter++; } // Using the logical AND operations to test the occurence of every single of the above conditions E = A && B && C && D; return E; }