Question: Write a program using functions that calculate the amount given to a customer based on their total The program premps the to either an item

 Write a program using functions that calculate the amount given to

Write a program using functions that calculate the amount given to a customer based on their total The program premps the to either an item choice, quantity, and payment amount. Use while loops for all error checking Range for inputs Quantity: (1-20]: (Quantity must be a whole number) Pay amount ($0.00-$100.00|Payment maybe a decimal) bool isvalidchoice (chair) - takes the user choice as an argument, and returns true it is a valid selection Otherwise it returns false. Float calculates the subtotal, and return the grand total with sales tax (5.25%). Float calchange (float, float) - Takes total and the amount paid and returns the change. Amount paid must be higher than the total

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!