Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: a close prime number

by Roy Johnson (Monsignor)
on Feb 11, 2005 at 22:27 UTC ( [id://430325]=note: print w/replies, xml ) Need Help??

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;
        }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://430325]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-03-28 22:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found