Question: Write a program that prompts the user to enter the number of books that they are purchasing. Prompt the user to enter their budgeted amount

Write a program that prompts the user to enter the number of books that they are purchasing. Prompt the user to enter their budgeted amount (real number) for their book purchase. Use a for loop to prompt the user to enter the price (real number) of each book. Accumulate the total of the books. Add 6% sales tax. Display the total of the books, the tax amount, and the total for the sale - include the "$" symbol in the display for all 3 amounts. Use a decision structure to determine if the total for the sale is within the user's budget. If it is, display a message (in your own words) that the user is within their budget. If not, display a message(in your own words) that they have gone over their budget.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!