Help for this page

Select Code to Download


  1. or download this
        print join(',',c(22.50,[.01,.05,.1,.25,1,5,10,20,50,100]));
  2. or download this
        20,1,1,0.25,0.25
  3. or download this
        print join(',',c(22.50,[.01,.05,.1,.20,1,2,5,10,20,50,100]));
  4. or download this
        20,2,0.2,0.2,0.1
  5. or download this
    sub c{
    ($t,$p,@r)=@_;@p=map{int($_*100)}@$p;
    $t=int($t*100);while($v=pop@p and$t>0
    ){while($t>=$v){push@r,$v/100;$t-=$v;
    }}@r
    }
    
  6. or download this
         print "$t != $v\n" if ($t != $v);
  7. or download this
         0.1 != 0.1