Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #17095
| From | Steve Graham <jsgrahamus@yahoo.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: coin changer --- a challenge for novices |
| Date | 2012-11-06 17:09 -0700 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <k7c8r1$3en$1@speranza.aioe.org> (permalink) |
| References | <a9cb961d-eef1-4578-9efc-ede0c3cfbdef@i2g2000pbi.googlegroups.com> |
Hugh Aguilar wrote: > I'm working my way through SICP. There is nothing like that available > for Forth! > > An example program in SICP is a program to calculate how many ways it > is possible to provide change (pennies, nickles, dimes, quarters and > half-dollars) for a specific amount. For example, how many ways can > $1.00 be provided in coins? (it is 292, according to their program). > As a bonus challenge --- display all of the combinations. > > So, the challenge for those who have never posted any Forth code on > comp.lang.forth (Gavino, Elizabeth Rather, John Passaniti, etc.), is > to provide code to solve this puzzle. I've made challenges like this > in the past (the alien-alphabet program > https://groups.google.com/group/comp.lang.forth/browse_thread/thread/dd8e30fcc7589749) > but received only responses from people who are already known Forth > programmers. This coin-changer is an easier problem though, so > hopefully those who don't program can solve it as their first-ever > Forth program. Please everybody wait for one week to give the three > non-programmers mentioned above plenty of time to write their program > and post it (I'm hoping to see Gavino come in first --- Go, Go, > Gavino!). > > As a slightly more advanced challenge (still pretty easy), solve the N- > Queens problem. I don't think this appears anywhere in SICP, but I > have a solution in my novice package ( > http://www.forth.org/novice.html). As a bonus challenge --- make your > program non-recursive as I did (the N-Queens problem is a classic > example of recursive-descent searching in many textbooks). > I fail to see why we have to be rude on this newsgroup. My mother didn't teach me to act this way nor did I teach my children thus.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
coin changer --- a challenge for novices Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-04 17:57 -0800
Re: coin changer --- a challenge for novices "Paul E. Bennett" <Paul_E.Bennett@topmail.co.uk> - 2012-11-05 07:47 +0000
Re: coin changer --- a challenge for novices Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-05 21:26 -0800
Re: coin changer --- a challenge for novices "Paul E. Bennett" <Paul_E.Bennett@topmail.co.uk> - 2012-11-06 19:00 +0000
Re: coin changer --- a challenge for novices Steve Graham <jsgrahamus@yahoo.com> - 2012-11-06 17:09 -0700
Re: coin changer --- a challenge for novices jfong <jfong@ms4.hinet.net> - 2012-11-06 17:57 -0800
Re: coin changer --- a challenge for novices Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-11-07 05:13 -0600
Re: coin changer --- a challenge for novices awegel@arcor.de (Alex Wegel) - 2012-11-07 16:04 +0100
Re: coin changer --- a challenge for novices Brad Eckert <hwfwguy@gmail.com> - 2012-11-07 08:11 -0800
Re: coin changer --- a challenge for novices "Ed" <invalid@nospam.com> - 2012-11-08 19:12 +1100
Re: coin changer --- a challenge for novices Ian Osgood <iano@quirkster.com> - 2012-11-08 07:19 -0800
Re: coin changer --- a challenge for novices anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-11-08 17:27 +0000
Re: coin changer --- a challenge for novices Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-08 19:56 -0800
Re: coin changer --- a challenge for novices "Ed" <invalid@nospam.com> - 2012-11-09 15:37 +1100
Re: coin changer --- a challenge for novices albert@spenarnc.xs4all.nl (Albert van der Horst) - 2012-11-14 10:59 +0000
Re: coin changer --- a challenge for novices jfong <jfong@ms4.hinet.net> - 2012-11-08 17:04 -0800
Re: coin changer --- a challenge for novices Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-08 20:10 -0800
Re: coin changer --- a challenge for novices "Ed" <invalid@nospam.com> - 2012-11-09 16:17 +1100
Re: coin changer --- a challenge for novices Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-08 23:17 -0800
Re: coin changer --- a challenge for novices arc <arc.deletethis@vorsicht-bissig.de> - 2012-11-11 17:53 +1300
Re: coin changer --- a challenge for novices Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-13 20:29 -0800
Re: coin changer --- a challenge for novices John Rible <google@sandpipers.com> - 2012-11-13 22:39 -0800
Re: coin changer --- a challenge for novices Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-11-13 22:54 -0800
csiph-web