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
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