Answered step by step
Verified Expert Solution
Question
1 Approved Answer
problem 1 is above here Write a program to determine the total cost for a set of purchases. The program should: use a while loop
problem 1 is above here
Write a program to determine the total cost for a set of purchases. The program should: use a while loop to prompt the user for each purchase's information, including for each item the number of items and the unit cost at the end of the while loop, get user input on whether there are more items after the while loop, calculate tax at 7.5% display the pre-tax cost, the amount of tax, and the total cost including tax Here is an example session: Item 1 Enter count of item 1: 2 Enter unit cost for item 1: 5.25 More items (y/n)? y Item 2 Enter count of item 2: 1 Enter unit cost for item 2: 10.50 More items (y/n)? n Enter sales tax rate (%): 7.5 Total cost (pre-tax): 21.00 Sales tax: 1.57 Total cost (with tax): 22.57 Activat Go to Set
Step by Step Solution
★★★★★
3.58 Rating (151 Votes )
There are 3 Steps involved in it
Step: 1
1 a...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