Question: in C++ 8 Write a program to prompt user to enter a password. A valid password must have at least 6 characters and must consist

 in C++ 8 Write a program to prompt user to enter

in C++

8 Write a program to prompt user to enter a password. A valid password must have at least 6 characters and must consist of at least one letter (ASCII code 97-122 or ASCII code 65-90), one digital number (ASCII code 49-57) and one symbol (ASCII code 33-47, for convenience, only accept those symbols). If the user enters a password shorter than 6 characters, or no letters or no digital or no special character, output the error message and let the user try again. Then let the user enter the password again to verify whether the user has remembered the password. If the two entered passwords are not the same, output error message and try again. If verification is OK, output "Your password is: password. Use do-while, break and continue to make your code efficient Sample output: Enter your password (e to exit): absd Password must be at least six characters! Try again. Enter your password (e to exit): abcdef Password must be at least one letter or digital number or symbol! Try again Enter your password (e to exit): abcde7$ Re-enter your password: abcde$7 Two passwords are different. Try again. Enter your password (e to exit): abcde7$ Re-enter your password: abcde7$ Your password is: abcde7$

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!