Ok so currently I am building an ATM in C# console and I'm at the part where i need it to dispense money, I can only use $20 and $50 notes.

So im having trouble making it acepting inputs like $60 and $180 and so on... Cause it tries to use a 50 and then cant use 20's because of the left over remainder. So it needs to be able to figure out if it can only use 20's ($60 for example)

Eventually I'm also going to have to have it say how many of each it is returning, so on the screen i can say please collect 2 $50 notes and 2 $20 notes if they where to input $140. So i guess i need to add something in the code to tell me that.

So if you guys have any ideas please let me know. Maths in coding as never been my strong point as I'm still learning

Ive got some of my own code but i cant get it to work so any suggestions or so on?

Thanks Nick, help is MUCH appreciated.