Answered step by step
Verified Expert Solution
Link Copied!

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!!image text in transcribedimage text in transcribedimage text in transcribed

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 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions