Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2018-06-18 07:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (109 votes). Check out past polls.

    Notices?