Anonymous user
Count the coins: Difference between revisions
m
→{{header|REXX}}: removed last blank line. -- ~~~~
m (→{{header|REXX}}: added whitespace, changed comments, eliminated a shortcut. -- ~~~~) |
m (→{{header|REXX}}: removed last blank line. -- ~~~~) |
||
Line 1,256:
if a==$.k then return f+1 /*handle another special case. */
if a <$.k then return f /*if amount is <a coin, return F.*/
return f + kaChing(a-$.k, k) /*keep recursing the diminished $*/</lang>
'''output''' when using the default input
<pre style="overflow:scroll">
|