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

m
added a requirement to this (draft) task to show the results here on this page, added whitespace and verbiage.
m (added a requirement to this (draft) task to show the results here on this page, added whitespace and verbiage.)
Line 1:
{{Draft task}}
 
;Task:
;Task:Find and show here on this page the minimum number of coins that can make a given value of   '''988.'''
<br> coins = [1,2,5,10,20,50,100,200]
 
<br> value = 988 <br>
Available coins are: &nbsp; '''1, &nbsp; 2, &nbsp; 5, &nbsp; 10, &nbsp; 20, &nbsp; 50, &nbsp; 100,''' &nbsp; and &nbsp; '''200.'''
<br>Coins are: <br>
 
4*200 <br>
 
1*100 <br>
The coins that would be dispensed are:
1*50 <br>
four coins of 200
1*20 <br>
one coin of 100
1*10 <br>
one coin of 50
1*5 <br>
one coin of 20
1*2 <br>
one coin of 10
1*1
one coin of 5
one coin of 2
one coin of 1
<br><br>