Question: (Check Password) Most websites impose certain rules for passwords. Suppose the password rules are as follows: A password must have at least 10 characters A

(Check Password) Most websites impose certain rules for passwords. Suppose the password rules are as follows:

A password must have at least 10 characters

A password must contain at least one upper case letter

A password must contain at least one digit

A password must contain at least one special character !@#$%^&*()

Write a program that prompts the user to enter a password and displays Valid passwordif the rules are followed or

Invalid passwordotherwise.

You must use a function when writing this lab assignment. You must provide at least three sample runs :

bool passwordIsValid(string pw)

Sample run:

$ ./checkPassWord.out

Enter a password : abcde12345D

Invalid Password!

$ ./checkPassWord.out

Enter a password : abcde12345A#

Valid password!

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!