Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment: Cash Fundraising Cashier Write a program that prompts the user for the price of an item that the customer purchases and the amount
Assignment: Cash Fundraising Cashier Write a program that prompts the user for the price of an item that the customer purchases and the amount of money the cashier receives from the customer (amount paid). Based on the item price entered by the user calculate the 5% tax and calculate the total item cost including the 5%tax. Given the total item cost and the amount received from the customer calculate the change given back to the customer. Because this is a fundraising event, the cashier can only return money owed to the customer in five-dollar bills. Any change smaller than five dollars is kept by the cashier to raise funds. For example, if the cashier owns the customer $16.50 then the customer will receive three five-dollar bills and the cashier will keep $1.50. If the cahier owns the customer $4.98, the customer will get zero back and the cashier will keep $4.98. The program performs the following operations: Asks the user for the item price Asks the user for the money given (paid) by the customer Calculates the 5% tax Calculates the total cost of the item including the tax Calculates the change given back to the customer base on the total cost of the item and money given by the customer Calculates the number of five dollars bills included in the change given back to the customer Display all the entered and calculated values. Sample output: Enter Item Price in dollars-> 2.50 Enter Money Inserted in dollars -> 10 Item cost without taxes 2.5 Money Inserted: 10.0 PST amount: 0.125 Total cost: 2.625 Total amount due to the customer: 7.375 Number of $5 bills paid back to the customer: 1
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