Question: Need help with the c++ code!!! Question #1: Password Validator (6 pts) The password validation is a common software function in almost all applications requiring



Need help with the c++ code!!!
Question #1: Password Validator (6 pts) The password validation is a common software function in almost all applications requiring user interface. A password should follow certain rules. Write a program that prompts the user to enter a password on the same line as the prompt, and validates the password according to the following rules: A password must have at least seven character and have an odd number of characters. . The middle character must be a digit. It must start and end with an upper case letter. If the user enters an incorrect password, the program should display the reason it is an invalid password. You need only output the 1st condition that fails. If the user enters a correct password, the program should display a congratulatory message, the password, the number of characters, the first and last letters, and the digit in the middle in a descriptive message Restrictions:No looping statements allowed (or needed). Here are some string functions you may find useful for this question: at), length(), substr), tolower() and toupper() Note1: For this question, the middle letter is the letter at index location length() divided by 2 Following are sample screen shots to illustrate the expected behavior of your program. User input at the keyboard is marked with a red circle integer Assume a perfect user who will always enter a positive Note2: Your program must display the same information but the output can be formatted differently We lcome to Nancy's Pas s 0rd Validator Enter password to be validated: Nancy Oops invalid password -Length is less than 7 Figure 1 - Example of invalid input length
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
