Question: Read in a 3-character string from input into variable passwordStr. Declare a boolean variable containsAlpha and set containsAlpha to true if passwordStr contains an alphabetic
Read in a 3-character string from input into variable passwordStr. Declare a boolean variable containsAlpha and set containsAlpha to true if passwordStr contains an alphabetic character. Otherwise, set containsAlpha to false. Ex: If the input is qxy, then the output is: Password accepted Note: Use getline(cin, passwordStr) to read the entire line from input into passwordStr.
Why does my solution not work? Why does the for loop not remember the assigned boolean value?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
