Count the coins/0-1: Difference between revisions

Content added Content deleted
(Added Wren)
(Removed superfluous 'the'. Perl entry no longer shows an example but Raku does.)
Line 13: Line 13:
<br/>
<br/>
;Task
;Task
Show the result the for the following examples:
Show the result for the following examples:


* &nbsp; coins = [1, 2, 3, 4, 5] and sum = 6
* &nbsp; coins = [1, 2, 3, 4, 5] and sum = 6
Line 25: Line 25:
* &nbsp; Show the result of the same examples when the order you take the coins doesn't matter. For instance the answer is 3 when coins = [1, 2, 3, 4, 5] and sum = 6.
* &nbsp; Show the result of the same examples when the order you take the coins doesn't matter. For instance the answer is 3 when coins = [1, 2, 3, 4, 5] and sum = 6.


*&nbsp; Show an example of coins you used to reach the given sum and their indices. See Perl for this case.
*&nbsp; Show an example of coins you used to reach the given sum and their indices. See Raku for this case.


=={{header|Perl}}==
=={{header|Perl}}==