Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re:{2} (Golf) Giving Change

by jeroenes (Priest)
on Jun 12, 2001 at 14:54 UTC ( #87765=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub c {($a,$c)=@_;@c=@$c;grep$_,map{$a>$_?
      &{sub{$a-=$_*($b=int($a/$_));"$b x $_"}}:""} reverse @c}
    
  2. or download this
    sub c{($a,$c)=@_;@c=@$c;grep$_,map{$a>$_?
      &{sub{$a-=$_*($b=int$a/$_);"$b x $_"}}:""}reverse@c}
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2023-03-23 09:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?