Question: C++ (String verification) Ask a user to enter a string. Your program will verify that users string meet the following criteria: -The string should be

C++ (String verification)

Ask a user to enter a string. Your program will verify that users string meet the following criteria:

-The string should be at least eight characters long.

-The string should contain at least one alphabet (a-z, A-Z).

-The string should have at least one digit (0-9).

-If a string does not meet the criteria, your program should display a message telling the user which requirement is not satisfied.

******************************************************************************

Hints: You may use the following string functions:

#include //in order to use some library functions

s.length() // returns the length of string s

isdigit(s[k]) // returns true if the character s[k] is a digit,

// returns false otherwise

isalpha(s[k]) // returns true if the character s[k] is a

// letter, returns false otherwise

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!