Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain the nature of human resource management.

Answered: 1 week ago

Question

Write a note on Quality circles.

Answered: 1 week ago