Question: Write a C++ program that reads in a list of 10 names as input from a user and places them in an array. The program
Write a C++ program that reads in a list of 10 names as input from a user and places them in an array. The program will prompt for a name and return the number of times that name was entered in the list. The program should output total number of instances of that name and then prompt for another name until the word done is typed in. For this lab, use the string data type as opposed to char to store the names (i.e. dont use c- strings). Turn in as a single PDF file (IN THIS ORDER) 1 Your output 2 Listing of source code files and include files Expected Input/Output: Enter name #1: Joe Enter name #2: Sally Enter name #3: Joe Enter name #4: Sue Enter name #5: Sally Enter name #6: Adam Enter name #7: Joe Enter name #8: Adam Enter name #9: Adam Enter name #10: Joe Who do you want to search for (enter done to exit)? Joe There are 4 instances of the name Joe. Who do you want to search for (enter done to exit)? Sally There are 2 instances of the name Sally. Who do you want to search for (enter done to exit)? Adam There are 3 instances of the name Adam. Who do you want to search for (enter done to exit)? Sue There is one instance of the name Sue. Who do you want to search for (enter done to exit)? John Johns name does not exist in this list. Who do you want to search for (enter done to exit)? done Thank you for using my program.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
