Home / Expert Answers / Computer Science / c-please-read-in-a-3-character-string-from-input-into-variable-passwordstr-declare-a-boolean-var-pa318

(Solved): C++ please Read in a 3-character string from input into variable passwordStr. Declare a boolean var ...



C++ please

Read in a 3-character string from input into variable passwordStr. Declare a boolean variable isValid and set isValid to true if passwordStr only contains alphabetic characters. Otherwise, set isValid to false.

Ex: If the input is dpm, then the output is:

Password is valid

Note: Use getline(cin, passwordStr) to read the entire line from input into passwordStr.Read in a 3-character string from input into variable passwordStr. Declare a boolean variable isValid and set isValid to true

Read in a 3-character string from input into variable passwordStr. Declare a boolean variable isValid and set isValid to true if passwordStr only contains alphabetic characters. Otherwise, set isValid to false. Ex: If the input is dpm, then the output is: Password is valid Note: Use getline(cin, passwordStr) to read the entire line from input into passwordStr. 1


We have an Answer from Expert

View Expert Answer

Expert Answer


Program - #include #include #include using namespace std; int main() { str
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe