Coding challenge

Paul D. DeRocco pderocco at
Thu Jan 31 15:02:02 EST 2013

> From: Robert Sneidar
> OIC now. 3 & 3 is the best answer but  the algorithm produces 
> 4 + 1 + 1. Well I think the issue here is that currency is 
> never (or almost never) designed this way. No one would make 
> a 3 dollar bill coincidentally with a 4 dollar bill. There 
> would be no practical reason to. 
> And yet I remember for a time the USA produced a one dollar 
> bill and a two dollar bill. So never say never! :-)
> It seems that when creating currency values, one of the 
> overriding principles OUGHT to be that each smaller value 
> ought to divide evenly into all the larger values. I'm sure 
> this is what was intended with American currency when it was 
> first created in it's present form. Otherwise making change 
> becomes rather tedious. 

Actually, there was a brief time (1875-1888) when we had both a quarter and
a 20-cent coin. So the algorithm would make 40 cents out of 25+10+5, instead
of 20+20.


Ciao,               Paul D. DeRocco
Paul                mailto:pderocco at 

More information about the Use-livecode mailing list