Question: Problem 4 (20 points): Write a program for an automatic teller machine (ATM) that dispenses money. The user should enter the desired withdrawal amount (a

 Problem 4 (20 points): Write a program for an automatic teller

Problem 4 (20 points): Write a program for an automatic teller machine (ATM) that dispenses money. The user should enter the desired withdrawal amount (a multiple of 10 dollars) and the machine dispenses this amount in the least number of bills. The bills dispensed by the ATM are 50s, 20s, and 10s. Write a function named bills that takes as argument the withdrawal amount and prints the types of bills dispensed. Your program should be checking if the user has entered an amount that is multiple of 10. Sample Code Execution: Red text indicates information entered by the user Enter the vithdrawal amount (must be multiple of $10):325 The amount you entered is not a multiple of $10 Enter the withdrawal amount in $:380 Your dispensed bills are: $50: 7 $20: 1 $10: 1 Enter the withdrawal amount (must be multiple of $10):160 Your dispensed bills are: $50: 3 $10: 1

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!