Explore BrainMass

Dispense requested amount using least number of bills

Write a C program for an automatic teller machine that dispenses money. The user should enter the amount desired (a multiple of 10 dollars) and the machine dispenses this amount using the least number of bills. The bills dispensed are 50s, 20s, and 10s. Write a function that determines how many of each kind of bill to dispense.

© BrainMass Inc. brainmass.com July 17, 2018, 9:29 pm ad1c9bdddf

Solution Preview

To dispense least number of bills, we need to dispense as many ...

Solution Summary

Solution also explains the logic that gives least number of bills in the dispensed amount.