Count the coins: Difference between revisions

m
(Added alternate method that keeps track of the specific combinations of coins)
 
(One intermediate revision by the same user not shown)
Line 171:
if (penny + 5 * nickel + 10 * dime + 25 * quarter = 100)
then
Put_Line(Integer'Image(count+1) & ": " &
Integer'Image(penny) & " pennies, " &
Integer'Image(nickel) & " nickels, " &
Line 1,218:
end.
</syntaxhighlight>
{{out}}
<pre>242</pre>
 
=={{header|Draco}}==
<syntaxhighlight lang="draco">proc main() void:
58

edits