Hello,
I am creating a simulation assuming that the ATM only has $10, $20, $50 and $100 bills. I need the output to look like this:
Say the withdrawal amount is $90
Dispense: 1 - $50
2 - $20
I am having difficulty creating a function that will dispense as shown. I know that if i divide the withdrawal amount by 20 I will know how many 20's it would take for the amount but how do I distinguish which bills to use? And to have it show the number of bills needed?
Any help is appreciated.
Thanks in advance
I am creating a simulation assuming that the ATM only has $10, $20, $50 and $100 bills. I need the output to look like this:
Say the withdrawal amount is $90
Dispense: 1 - $50
2 - $20
I am having difficulty creating a function that will dispense as shown. I know that if i divide the withdrawal amount by 20 I will know how many 20's it would take for the amount but how do I distinguish which bills to use? And to have it show the number of bills needed?
Any help is appreciated.
Thanks in advance
Comment