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

Recommended Answers

All 4 Replies

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.