Change for a Dollar



I heard one night on David Letterman that there are
293 ways to make change for a dollar. So I started
thinking about writing a program to list out *all*
the ways a dollar could be broken into change. I
just can *not* seem to get a hold on this problem.

I wrote a program with a recursive function attempting
to make the change, but it had excessive runtime and
does *not* seem to be working in any case...

Does anyone have an idea how I can proceed???
--
+----------------------------------------------------------------+
| Charles and Francis Richmond richmond at plano dot net |
+----------------------------------------------------------------+
.



Relevant Pages

  • Re: Change for a Dollar
    ... Mark P wrote: ... thinking about writing a program to list out *all* ... There are smarter ways to do it but a brain dead simple approach that ought to be fast enough on any machine built in the last twenty years... ...
    (comp.programming)
  • Re: looking for David Letterman fans in the NYC area
    ... I'm a reporter for the NY Daily News and writing an article on super ... fans for this Sunday, 9/6. ... If you're a huge fan of David Letterman and ...
    (alt.fan.letterman)
  • Re: looking for David Letterman fans in the NYC area
    ... I'm a reporter for the NY Daily News and writing an article on super ... fans for this Sunday, 9/6. ... If you're a huge fan of David Letterman and ...
    (alt.fan.letterman)
  • Re: How big number of INT can we use?
    ... What is the limit of INT variable type? ... I'm writing a code to calculate the sum of odd/even numbers between a ...
    (comp.lang.c)
  • Re: looking for David Letterman fans in the NYC area
    ... I'm a reporter for the NY Daily News and writing an article on super ... fans for this Sunday, 9/6. ... If you're a huge fan of David Letterman and ...
    (alt.fan.letterman)