Help for this page

Select Code to Download


  1. or download this
    sub roundoff
    {
    ...
      }
      print "\n";
    }
    
  2. or download this
    use POSIX qw(ceil);
    
    ...
    
      return int(ceil($num/$roundto))*$roundto;
    }
    
  3. or download this
    sub max
    {
    ...
      my $num = shift;
      return 10 ** max(int(log(abs($num))/log(10))-1,1);
    }