Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seamountain/2733134 to your computer and use it in GitHub Desktop.
Save seamountain/2733134 to your computer and use it in GitHub Desktop.
Supplement Program
#!/usr/bin/env perl
use strict;
use warnings;
my $num = undef;
my $is_prime = 1;
for (2..10000) {
$num = $_;
unless ($num % 100) {
$line = $num;
print "\n", $num - 99, "-$num", ": ";
}
for (2..$num-1) {
my $devide = $_;
unless ($num % $devide) {
$is_prime = 0;
last;
}
}
if ($is_prime) {
print $num, ", ";
}
$is_prime = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment