1. Initialize an empty list named pets. 2. Use a while loop to ask the user to add to the list. (You can stop the loop either on an empty string or by asking if they want to continue.) 3. Sort the list. 4. Use a for loop to display the updated, sorted list. 5. Print the number of pets in the list after the list of pets is printed. Remember your heading comments - name, date, activity description.
1. Initialize an empty list named pets. 2. Use a while loop to ask the user to add to the list. (You can stop the loop either on an empty string or by asking if they want to continue.) 3. Sort the list. 4. Use a for loop to display the updated, sorted list. 5. Print the number of pets in the list after the list of pets is printed. Remember your heading comments - name, date, activity description.
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.5: Case Studies
Problem 4E: (List maintenance) a. Write a complete C++ program that can be used to update an ordered list of...
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage