Question
The program should be written in C++ please. Create a program as follows: The program assists a shopkeeper in calculating the cost of a customers
The program should be written in C++ please.
Create a program as follows:
The program assists a shopkeeper in calculating the cost of a customers shoppingcart. The shop sells six items:
Asparagus
Brussels Sprouts
Corn
Lettuce
Pumpkins
Watermelons
When the program is run, it should first prompt the user for the number asparagus packages being purchased and accept input from the user with that number. The program should then prompt the user for the price of each asparagus package and accept input from the user with that number. Next, the program should do the same for Brussels sprouts. Then for corn, lettuce, pumpkins, and watermelon in turn.
After inputting the number of watermelons being purchased and the price of each watermelon, the program should display a summary describing the number of each vegetable and the price of each vegetable.
The program should then calculate and display a subtotal for the cost of all the vegetables being purchased.
The program should then calculate the sales tax on the vegetable purchase, assuming an 8.25% tax rate and print the tax.
Finally, the program should display a final total consisting of the sum of the subtotal and the tax.
In all cases, the costs should be displayed with two decimal places. In addition, the costs should all be aligned so the decimal points line up vertically. You can assume the cart will not contain more than 99 of any particular vegetable and you can assume that no vegetable purchase will total more than $999,999.99.
It's a relatively simple C++ program but I'm new to programming so a simple bug/syntax error takes me forever to figure out.
Please follow the instructions, I'm looking forward to rating you positively.
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