Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago