Write a program that will simulate a change machine found at cash registers. Input the amount paid and amount due from the keyboard. Tell the user how much change is owed and number of pennies,...

Write a program that will simulate a change machine found at cash registers. Input the amount paid and amount due from the keyboard. Tell the user how much change is owed and number of pennies, nickels, dimes, and quarters in change a customer would receive. Pay special attention to roundoff error Your program should use division and modular division. No ifs orloops may be used. You may assume all change will be a positive number with no more than two decimal places. If more than $100 is owed, the full value should be included in the number of quarters returned. For example, $2.50 should be returned as 10 quarters. Hint: Modular division is a great way to find the remainder of a division Think about how you can use this to calculate the change that is left over after some coins are given. Sample Run: Please Enter the Amount Paid 5.00 Please Enter the Cost of the Item 4.57 Change owed: 0.43 Pennies 3 Nickels 1 Dimes: 1 Quarters: 1 NOTE: You MUST use the class name "Main for this assignment. REMEMBER: you must SUBMIT your answer. Your assignment doesn't count as complete unless it has been submitted.

May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here