Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Simple but thought-provoking programming tasks [OT]

by bobf (Monsignor)
on Apr 16, 2007 at 04:06 UTC ( [id://610259]=note: print w/replies, xml ) Need Help??


in reply to Simple but thought-provoking programming tasks [OT]

There's always the classic "making change" problem:

What is the least number of coins required to total $x.xx?
Variations on that problem could include:
  • Allow the user to input the value of each coin (instead of relying on the assumed values of a penny, nickel, etc)
  • Add restrictions on the maximum (or minimum) number of coins available (e.g., you can use no more than one nickel)
  • Find a solution that uses some exact number of coins
  • Count how many different ways are possible (using any number of coins)

  • Comment on Re: Simple but thought-provoking programming tasks [OT]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://610259]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-25 19:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found