Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c++ Read in a 2-character string from input into variable userPassword. Declare a boolean variable hasLowercase and set hasLowercase to true if userPassword contains

in c++ image text in transcribed
Read in a 2-character string from input into variable userPassword. Declare a boolean variable hasLowercase and set hasLowercase to true if userPassword contains a lowercase letter. Otherwise, set hasLowercase to false. Ex. If the input is jJ, then hasLowercase is assigned with true, so the output is: Password is valid Ex. If the input is 82 , then hasLowercase is assigned with false, so the output is: Password is not valid Note: Use getline(cin, userPassword) to read the entire line from input into userPassword. 1 \#include 3 \#include 4 using namespace std; 5 int main( \{ 6 ing userPassword; 7 string 8 s K * Your code goes here "/ if (hasLowercase) \{ cout "Password is valid" endl; \} else \{ cout "Password is not valid" endl

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions