Question: C++ program using IF ELSE statment The customer is given the option of automated checkout at retail centers. Write a program that will accept the

C++ program using IF ELSE statment

C++ program using IF ELSE statment The customer is given the option

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

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!