Help for this page

Select Code to Download


  1. or download this
        my $M = 8;
        my $A = 5;
    ...
            $X = (($X * $A) + 1) % $M;
            return ($X);
        }
    
  2. or download this
        +---------------+
        |            +  |
    ...
        |+              |
        |      +        |
        +---------------+
    
  3. or download this
        my $Y = 0;
        my @T = (0) x $M;
    ...
            ($Y, $T[$Y]) = ($T[$Y], lcrng());
            return ($Y);
        }
    
  4. or download this
        +---------------+
        |          +   +|
    ...
        |+              |
        |    +   +      |
        +---------------+
    
  5. or download this
        $Y == 1
        @T == ( 1, 1, 1, 1, 1, 1, 1, 1 )