Explore BrainMass
Share

Dispense requested amount using least number of bills

This content was STOLEN from BrainMass.com - View the original, and get the solution, here!

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 September 20, 2018, 2:23 pm ad1c9bdddf - https://brainmass.com/engineering/electrical-engineering/dispense-requested-amount-using-least-number-of-bills-224617

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.

$2.19