i have no idea how do i even form this program let alone make it. My assignment entries will close in 3 hours and i need this finished asap. Hope i get help here.
Write a program that prompts the user to enter a password and then the program
validates the strength of the password based on the following rules:
a. The password must be between 8 and 32 characters.
b. The password must have at least one upper-case letter.
c. The password must have at least one digit (0-9).
d. The password must have at least one of the following special characters: $, *, ^,
&, #, _, ?.
In case the password does not follow the rules, the program must keep prompting the
user to enter a valid password.
Note: you cannot use the cctype library.
thats what i have done so far(basically nothing)
#include <iostream>
#include<string>
using namespace std;
int main()
{
string pass;
cout << "Enter a strong password: ";
cin >> pass;
int i = 0;
while (i != 0) {
if (pass.length() < 8 || pass.length() > 32) {
cout << "the password is too long or too small ";
yes, it worked,thank you so much. I have never used the cstring library though. Is there a way for it to be done with just iostream and string libraries?