Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

RE: RE: sieve of erothenes

by maverick (Curate)
on Jul 01, 2000 at 03:24 UTC ( #20694=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub A { @_=(1);L:for(2..100){$i=@_;while(--$i){next L if!($_%$_[$i])}p
    +ush@_,$_} }
    sub M { for(1..100){push@_,$_;for(@_[1..$#_-1]){pop@_ and last if!($_[
    +-1]%$_)}} }
    
    print join(" ",@_),"\n";
    
  2. or download this
    sub A { @_=(1);L:for(2..100){$i=@_;while(--$i){next L if!($_%$_[$i])}p
    +ush@_,$_} }
    sub M { for(1..100){push@_,$_;for(@_[1..$#_-1]){pop@_&&last if!($_[-1]
    +%$_)}} }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (16)
As of 2014-07-10 09:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (204 votes), past polls