Help for this page

Select Code to Download


  1. or download this
    my $M;
    my $n;
    my $remaining = $n % $M;
    my $next_multiple = $n + $M - $remaining;
    
  2. or download this
    for my $n (1..20) {
      print "$n:\t";
    ...
      };
      print "\n";
    };
    
  3. or download this
    perl -e "my $n=20; for(@ARGV){$x=$n-1+($_-($n-1)%$_);print qq($n\[$_] 
    +:$x\n)}" 2 3 4 5 6 7 8 9 10
    
    # resp.
    
    $x=$n-1+($M-($n-1)%$M)