Anonymous user
Count the coins: Difference between revisions
→{{header|ALGOL 68}}
(Added more efficient version, also inspired by a Haskell version) |
|||
Line 215:
INT denom = denoms[i];
FOR j FROM 0 TO amount DO new counts[j] := 0 OD;
FOR
IF LONG INT count = counts[
FOR
new counts[
OD
FI;
OD
OD;
counts[amount]
|