Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ program The customer is given the option of automated checkout at retail centers. Write a program that will accept the customer's payment (in dollars
C++ program
The customer is given the option of automated checkout at retail centers. Write a program that will accept the customer's payment (in dollars and cents only) and returns the correct change back to the customer. For example, if the items purchased were $5.15 and the customer pays $10.00 the change returned would be four one dollar bills, three quarters, and one dime. If the items purchased were $5.15 and the customer pays $20.00 the change returned would be a ten dollar bill, four one dollar bills, and three quarters, and one dime. If the items purchased were $5.15 and the customer pays six dollars, then the change would be three quarters and one dime. You may assume the following constraints: The purchase price of all items will never exceed $50.00. The customer will purchase the items using a max denomination of a hundred dollar bill. The customer will only pay in whole dollars only, never in cents. The customer's payment will always be greater than the cost of the items purchased. Your program should ask for the purchase amount and also the payment amount from the user
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