Help for this page

Select Code to Download


  1. or download this
    ($num,$base) = @ARGV;
    $orig = $num;
    ...
      $bin .= $num ? "1" : "0";
      print "$orig in base $base: $bin\n";
    }
    
  2. or download this
    sub hp_only_1_0_in_base_x {
      ($num,$base) = @_;
    ...
      }
      return ($num > 1) ? 0 : 1
    }