August 25, 2022 at 10:38 PM
A customer is having problems due to lack of coins and needs to optimize change,
we need to add a function in your system to help calculate usage
few coins possible to return change. Develop in JavaScript
a logic to calculate a certain value in as few coins as possible. using
HTML provides a field to enter the value to be calculated and a button
to perform the calculation. When you press the button, it should do the calculation and show the
result with total coins and division by values used between 50, 25, 10, 5
and 1 cent. As an example, after typing 2.36 the expected result should be:
Total coins: 5
To be:
4 of 50 cents
1 of 25 cents
1 out of 10 cents
0 out of 5 cents
1 of 1 cent
we need to add a function in your system to help calculate usage
few coins possible to return change. Develop in JavaScript
a logic to calculate a certain value in as few coins as possible. using
HTML provides a field to enter the value to be calculated and a button
to perform the calculation. When you press the button, it should do the calculation and show the
result with total coins and division by values used between 50, 25, 10, 5
and 1 cent. As an example, after typing 2.36 the expected result should be:
Total coins: 5
To be:
4 of 50 cents
1 of 25 cents
1 out of 10 cents
0 out of 5 cents
1 of 1 cent
☠ fuck ☠

