Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. The output of the program is every word in the list that contains the character at least once. For coding simplicity, follow each output word by a comma, even the last one. Assume at least one word in the list will contain the given character. Ex: If the input is: 4 hello zoo sleep drizzle z then the output is: z0o, drizzle, To achieve the above, first read the list into a vector. Keep in mind that the character 'a' is not equal to the character 'A'. 230402.175a226. gdany7 LAB 4.25.1: LAB: Contains the character АСTIVITY main.cpp Load default template. 1 #include 2 #include 3 using namespace std; 5 int main() { /* Type your code here. */ 8 return e; 10 } 11

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 3PE
icon
Related questions
Question
4.25 LAB: Contains the character
Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. The output of
the program is every word in the list that contains the character at least once. For coding simplicity, follow each output word by a comma,
even the last one. Assume at least one word in the list will contain the given character.
Ex: If the input is:
4 hello zoo sleep drizzle z
then the output is:
zoo, drizzle,
To achieve the above, first read the list into a vector. Keep in mind that the character 'a' is not equal to the character 'A.
2304021753326.goazny7
LAB
АCTIVITY
4.25.1: LAB: Contains the character
main.cpp
Load default template.
1 #include ciostream>
2 #include <vector>
3 using namespace std;
4
5 int main( {
/* Type your code here. */
8
return e;
10 }
11
Transcribed Image Text:4.25 LAB: Contains the character Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. The output of the program is every word in the list that contains the character at least once. For coding simplicity, follow each output word by a comma, even the last one. Assume at least one word in the list will contain the given character. Ex: If the input is: 4 hello zoo sleep drizzle z then the output is: zoo, drizzle, To achieve the above, first read the list into a vector. Keep in mind that the character 'a' is not equal to the character 'A. 2304021753326.goazny7 LAB АCTIVITY 4.25.1: LAB: Contains the character main.cpp Load default template. 1 #include ciostream> 2 #include <vector> 3 using namespace std; 4 5 int main( { /* Type your code here. */ 8 return e; 10 } 11
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
Time complexity
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning