That's really easy:
sub find_closest_primes { my $number = shift; my @close_primes; for my $close (find_close_numbers( $number )) { push @close_primes, $close if is_prime( $close ); } return @close_primes; }
All you have to do is fill in the behavior of find_close_numbers() and is_prime()!
In reply to Re: a close prime number
by chromatic
in thread a close prime number
by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |