Find minimum number of coins that make a given value: Difference between revisions

→‎J: add
imported>AldoBaldo
No edit summary
(→‎J: add)
Line 714:
1 * 2
1 * 1</pre>
 
=={{header|J}}==
<syntaxhighlight lang="j">0 0 $ (| [ <.@%~ 1!:2&2@, [)/ 1 2 5 10 20 50 100 200 , 988</syntaxhighlight>
{{out}}
<pre>4 200
1 100
1 50
1 20
1 10
1 5
1 2
1 1</pre>
 
=={{header|JavaScript}}==
559

edits