Skip to content
Advertisement

Money denomination program for ATM in js that would be flexible to handle and dispense money in minimum notes

the code should be able to handle any amount up to 20000, For example, suppose the Entered amount is 2600 when the balance in the card is 3000. Will output following : New Balance – 400 Notes: 2000 * 1 500 * 1 100 * 1

(only three banknotes 2000, 500, 100) and the cash limit is 20000

I am new in the javascript world, and I am not able to write the code, could anyone help me out??? please!

JavaScript

Sorry for a dumb program, but I need help please can anyone give me a solution in typeScript code, returning the req denomination in array!!

Advertisement

Answer

JavaScript

Based on the amount you can adjust the logic.

Hope this helps.. 🙂

Advertisement