Question: Write a complete C++ program for a small store that contains the store goods and their prices as follows: Create two arrays the
Write a complete C++ program for a small store that contains the store goods and their prices as follows:
Create two arrays – the first one for goods, the second one for its price. ( 1 mark).
{eggs , chees , milk , beans, rice}
(20 , 15.5 , 10 , 5.25 , 18 }
Ask the user to enter one element to search if it’s available in the store or not. ( 1 mark).
(What do you want to buy from our store?) …..
the item available, its price ….
OR sorry, we don’t have this item in our store.
Delete the selected Item and its price for your arrays, then shift the rest. ( 1 mark).
Print the store goods after deletion. ( 0.5 mark).
Ask if the user needs to buy another item. ( 0.5 mark).
(Do you need to buy another item? Enter one item or X to exit).
Find the total price for all goods. ( 0.5 mark).
Take a screenshot of the output. ( 0.5 mark).
Step by Step Solution
3.40 Rating (153 Votes )
There are 3 Steps involved in it
include using namespace std int main Initialize the arrays string goods eggs cheese milk beans rice ... View full answer
Get step-by-step solutions from verified subject matter experts
