Question: I ' m having difficulty with strings in for loops in C + + Jump to level 1 String passPhrase is read from input. For

I'm having difficulty with strings in for loops in C++
Jump to level 1
String passPhrase is read from input. For each character in passPhrase that is a letter, increment count by 1. Then, output "Valid"
if count is less than 6 and passPhrase's length is greater than 5. Otherwise, output "Invalid". End each output with a newline.
grad Click for examples
Ex 1: If the input is yZsXD6, then the output is:
Valid
Ex 2: If the input is s6FmW, then the output is:
Invalid
Note: isalpha() returns true if a character is a letter, and false otherwise. Ex: isalpha('a') returns true. isalpha('8') returns false.
#include
I ' m having difficulty with strings in for loops

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 Programming Questions!