Read the string variables visitedListName, place1, place2, and place3 from input, assuming that the list's name contains multiple words and each place visited is a single word. The first input line contains the list's name and the second input line contains the places visited. Ex: If the input is: Countries I've visited Qatar Zambia Malta then the output is: Countries I've visited: Qatar Zambia Malta #include #include using namespace std;   int main() {    string visitedListName;    string place1; string place2; string place3;      /* Your code goes here */      cout << visitedListName << ":" << endl; cout << place1 << endl; cout << place2 << endl; cout << place3 << endl;      return 0; }

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

Read the string variables visitedListName, place1, place2, and place3 from input, assuming that the list's name contains multiple words and each place visited is a single word. The first input line contains the list's name and the second input line contains the places visited.

Ex: If the input is:

Countries I've visited Qatar Zambia Malta

then the output is:

Countries I've visited:

Qatar

Zambia

Malta

#include <iostream>
#include <string>
using namespace std;
 
int main() {
   string visitedListName;
   string place1;
string place2;
string place3;
 
   /* Your code goes here */
 
   cout << visitedListName << ":" << endl;
cout << place1 << endl;
cout << place2 << endl;
cout << place3 << endl;
 
   return 0;
}

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
List
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