CHALLENGE ACTIVITY 417118.2791720.qx3zqy7 Jump to level 1 3.14.1: String access operations. Given string userString, output "Valid length" if the string's length is greater than or equal to 3. Otherwise, output "Not long enough". End with a newline. Ex: If the input is: garden then the output is: Valid length 1 #include 2 #include 3 using namespace std; 4 5 int main() { 6 7 8 9 10 11} Check string userString; getline(cin, userString); return 0; 1 Next level 2 3 4 >->D-D-

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 3PE
icon
Related questions
Question

in C++

CHALLENGE
ACTIVITY
3.14.1: String access operations.
417118.2791720.qx3zqy7
Jump to level 1
Given string userString, output "Valid length" if the string's length is greater than or equal to 3. Otherwise, output "Not long
enough". End with a newline.
Ex: If the input is:
garden
then the output is:
Valid length
1 #include <iostream>
2 #include <string>
3 using namespace std;
4
5 int main() {
6
7
8
9
10
11 }
Check
string userString;
getline(cin, userString);
return 0;
1
Next level
2
3
<
1
2
3
4
Transcribed Image Text:CHALLENGE ACTIVITY 3.14.1: String access operations. 417118.2791720.qx3zqy7 Jump to level 1 Given string userString, output "Valid length" if the string's length is greater than or equal to 3. Otherwise, output "Not long enough". End with a newline. Ex: If the input is: garden then the output is: Valid length 1 #include <iostream> 2 #include <string> 3 using namespace std; 4 5 int main() { 6 7 8 9 10 11 } Check string userString; getline(cin, userString); return 0; 1 Next level 2 3 < 1 2 3 4
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Map
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT