Count the coins/0-1: Difference between revisions
m
→{{header|Phix}}: reworded comments
m (→{{header|Pascal}}: added checking all weights not taking order into account) |
m (→{{header|Phix}}: reworded comments) |
||
Line 329:
=={{header|Phix}}==
=== sane way ===
<lang Phix>function choices(sequence coins, integer tgt, cdx=1)
integer count = 0
Line 353:
</pre>
=== silly way ===
<lang Phix>function silly(sequence coins, integer tgt, cdx=1)
integer count = 0
Line 374:
</pre>
=== very silly way ===
<lang Phix>function very_silly(sequence coins, integer tgt, cdx=1, taken=0)
integer count = 0
|