Help for this page

Select Code to Download


  1. or download this
    for (10,15,20831323,99,100) {
      print "$_: ", nearPrime($_), "\n";
    ...
    }
    
    ...
    
  2. or download this
    sub nearPrime {
        my $num = shift;
    ...
            $sign = -$sign;
        }
    }
    
  3. or download this
    BEGIN {
        my @primes = (2, 3); my $max = 3;
    ...
            return 1;
        }
    }