in reply to Re^3: Primes. Again.
in thread Primes. Again.
use strict; use warnings; my @prime = (2); my $not_prime; for my $i(3..100){ $not_prime=0; for(@prime){ next if int($i/$_)!=($i/$_); $not_prime=1; } push @prime, $i if $not_prime!=1; } print join "\n", @prime;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Primes. Again.
by GrandFather (Saint) on Apr 26, 2006 at 21:06 UTC |