Question: CODE is C++ Learning Objectives: More experience with arrays Searching an array of string with linear search - Sorting an array of strings General Description:
CODE is C++
Learning Objectives: More experience with arrays Searching an array of string with linear search - Sorting an array of strings General Description: This lab is very similar to Lab 4; you may want to review the Lab 4 document for notes on using getline) Write a program that asks the user how many names will be entered, maximum of 10. You may assume the user enters a number between 1 and 10 (or if you like, add a Validation Loop to force a correct answer) Ask the user to enter each name individually. Since there may be spaces in the names, use getline). Ask the user to enter a name for which to search. Search the list of names, and if found, print PRESENT! along with the index of where the name was found. When not found, print ABSENT! Finally, sort the names in ascending order. The print the sorted list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
