I came across this interesting puzzle. How would you code the solution to this?

Easy :)

But now, do you want us to code it for you?
Or would you like to try it yourself?

Hint: you could start by counting pennies and then count 5's with pennies (for nickels) and then 10's with pennies, then 15's etc. There is a pattern to how you can make change in otherwords haha

I would like to try it myself. I considered dman's hint but it only included two values per counting.

Please give more clues.