Question: Complete the following assignment in C++ Ask the user for five names. Output those names. Put an integer before each name to indicate the ordering

Complete the following assignment in C++

Ask the user for five names. Output those names. Put an integer before each name to indicate the ordering

This program is tricky because array subscripts start at zero, but the output of this program goes from one to five. Keep this in mind when coding.

Required output:

Enter five names Enter friend 1 Enter friend 2 Enter friend 3 Enter friend 4 Enter friend 5 Here are all of those names Friend 1 is Bill Friend 2 is Steve Friend 3 is Mark Friend 4 is Elon Friend 5 is Henry 

___________________________________________________________________________________________________________________________________________________

Modify the previous program. Show the user a list of the names (with integers before each name). Allow the user to select which friend is his/her best friend.

Required output:

Enter five names Enter friend 1 Enter friend 2 Enter friend 3 Enter friend 4 Enter friend 5 Here are all of those names Friend 1 is Fred Friend 2 is Bill Friend 3 is Tom Friend 4 is Frank Friend 5 is Elon Which friend is your best friend? (Enter an integer) Fred? Yes, Fred is awesome 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!