methodology for making change
I need to program a methodology very similar to making change for a dollar.
Say I have a value to obtain, 100 cents.
I have 1 cent, 5 cent, 10 cent, 25 cent pieces to do it with.
What would be the best methodology to figure out how many differnt ways I could make change?
I need to program some thing like this and how it goes now takes forever.
Actually, someone else on my team needs to do this and he is stuck, so I'd like
to swoop in and rescue the whole thing, you know?
anyways. anyone got any suggestions?