Count the coins: Difference between revisions

m
→‎{{header|REXX}}: optimized the subroutine somewhat.
m (→‎{{header|REXX}}: added verbage to the output display, changed/added comments and whitespace, used better indentations.)
m (→‎{{header|REXX}}: optimized the subroutine somewhat.)
Line 1,479:
kaChing: procedure expose $.; parse arg a,k /*sub is recursive. */
 
if a==0 then f=return 1 /*unroll special case*/
else if k==1 then f=0 /* " " " */
else f=kaChing(a, k-1) /*recurse the amount.*/