Help for this page

Select Code to Download


  1. or download this
    $tmp = @ARGV[0];
    $i = 0;
    
    ...
        $i += 1;
    }
    print 2 ** $i;
    
  2. or download this
    sub nextpow2 {
        my $s= shift(@_);
        my $p= 1;
        $p *= 2   while  $p <= $s;
        return $p;
    }