Question: Using C++ Write a program that allows you to enter grocery item names into an array of strings and the cost of each item in

Using C++

Write a program that allows you to enter grocery item names into an array of strings and the cost of each item in an array of doubles. At the beginning of the program prompt the user to enter the total number of items they will be entering. Max value of 100. After entering the item names and cost, the application should display the names and cost and total cost of all items.

***Your program must work EXACTLY like the one shown below.***

Example Run:

Enter number of grocery items you will be entering: 3

Please enter the item names as one word only. Example: tomatoes

Enter the cost as a decimal number. Example: 2.44

Enter item 1: apples

Enter the cost of the apples: 3.56

Enter item 2:: milk

Enter the cost of the milk: 2.50

Enter item 3: bread

Enter the cost of the bread: 2.99

OUTPUT:

Items Cost

apples $3.56

milk $2.50

bread $2.99

Total: $9.05

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!