Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CAN SOMEONE PLEASE HELP ME WRITE THIS CODE IN C++, HAVE COMMENTS IF POSSIBLE!! General Description: This lab is very similar to Lab 4; you
CAN SOMEONE PLEASE HELP ME WRITE THIS CODE IN C++, HAVE COMMENTS IF POSSIBLE!!
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. CAUsers\Kevin\Documents\HTML\cs215labslab5\ nter number of names (1-10: 6 Enter a name: Carl Carrot Enter a name: Adam Ant Enter a name: Sally Sue Enter a name: Danny Do Enter a name: Betty Boio Enter a name: Eddy Rabbit Enter a search name: Betty Boop PRESENT Found in position 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started