From: Andrew Timberlake Date: 2008-01-26T12:47:42+09:00 Subject: Re: [QUIZ] Making Change (#154) Same here in South Africa. We're phasing out 1c & 2c coins so change of R7.99 would usually be R8.00 (ie. The store rounds to the benefit of the consumer) This could be applied to a case like make_change(14, [10,5,3]) where the answer is [10,5] as the answer should leave the change giver the least out of pocket? Andrew Timberlake andrew@andrewtimberlake.com 082 415 8283 skype: andrewtimberlake "I have never let my schooling interfere with my education." --Mark Twain -----Original Message----- From: Sharon Phillips [mailto:phillipsds@yahoo.co.uk] Sent: 26 January 2008 01:09 AM To: ruby-talk ML Subject: Re: [QUIZ] Making Change (#154) For anyone interested, here are the Australian coin values: [200, 100, 50, 20, 10, 5] # $2 and $1 are coins. We also have no 1c or 2c This means I have to consider the case where it is not possible to construct the amount from the given coins, eg. $7.99 Nice to have one I could do in the ten minutes after breakfast while the kids get dressed :) Cheers, Dave !DSPAM:3,479a6d34191821551420065!