I NEED JAVASCIPT SOLUTION PLEASE Task An ATM only has 100, 50 and 20 dollar bills (USD) available to be dispensed. Given an amount between 40 and 10000 dollars (inclusive) and assuming that the ATM wants to use as few bills as possible, determinate the minimal number of 100, 50 and 20 dollar bills the ATM needs to dispense (in that order). Here is the specification for the withdraw method you'll complete: withdraw(amount) Parameters amount: Integer - Amount of money to withdraw. Assume that the amount is always divisible into 100, 50 and 20 bills. Return Value Array (of Integers) - An array of 3 integers representing the number of 100, 50 and 20 dollar bills needed to complete the withdraw (in that order). Constraints 40 ≤ amount ≤ 1000
I NEED JAVASCIPT SOLUTION PLEASE
Task
An ATM only has 100, 50 and 20 dollar bills (USD) available to be dispensed.
Given an amount between 40 and 10000 dollars (inclusive) and assuming that the ATM wants to use as few bills as possible, determinate the minimal number of 100, 50 and 20 dollar bills the ATM needs to dispense (in that order).
Here is the specification for the withdraw method you'll complete:
withdraw(amount)
Parameters
amount: Integer - Amount of money to withdraw. Assume that the amount is always divisible into 100, 50 and 20 bills.
Return Value
Array (of Integers) - An array of 3 integers representing the number of 100, 50 and 20 dollar bills needed to complete the withdraw (in that order).
Constraints
40 ≤ amount ≤ 1000
Step by step
Solved in 4 steps with 3 images