Help for this page

Select Code to Download


  1. or download this
    sub make_change {
        my ($N, @coins) = @_;
    ...
    }
    
    print make_change( 100 => 50, 25, 10, 5, 1 );
    
  2. or download this
    sub make_change {
        my ($N, $coins, $callback, @so_far) = @_;
    ...
      [50, 25, 10, 5, 1],
      sub { print "@_\n" }
    );