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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started