Find minimum number of coins that make a given value: Difference between revisions
Content added Content deleted
m (use divmod) |
m (→{{header|REXX}}: changed wording in the REXX section header.) |
||
Line 98: | Line 98: | ||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
A check was made to |
A check was made to see if an exact pay─out isn't possible. |
||
The total number of coins |
The total number of coins paid out is also shown. |
||
<lang rexx>/*REXX pgm finds & displays the minimum number of coins which total to a specified value*/ |
<lang rexx>/*REXX pgm finds & displays the minimum number of coins which total to a specified value*/ |
||
parse arg $ coins /*obtain optional arguments from the CL*/ |
parse arg $ coins /*obtain optional arguments from the CL*/ |