Hello Alex,
Monday November 03 1997, Alex Walker writes to All:
AW> I'm a student studying C++ programming. I've got an assignment
AW> question where I don't even have an idea how to attack the
AW> problem. The program is to input a value (like $1. $2. $5..)
AW> and spit out a table showing all the different cominations of coins
AW> that could be used to make up that value.
Maybe a recursive function, taking the first coin that's value is <= the
entry, and calling herself with (entry)-(value of the coin).
Then, this function takes the immediate lower coin, till the smallest coin.
Best regards,
Squirrel
--- FMail/Win32 1.22
(2:291/766.187)
---------------
* Origin: Marginal - Error in origin line! CTRL-ALT-DEL to res
|