Find prime numbers in a given range.
Command line tool that prints prime numbers to standard output. Commands look like this:
./primes <start_of_range_to_search> <end_of_range>
-
Install rust
-
Clone or download this repository
-
Compile with the following shell command:
cargo build --release
-
You now have the
primes
executable in ./target/release/
-
Find all prime numbers between 1 and 10:
$ ./primes 1 10 2 3 5 7
-
Find all primes between 1,000,000,000,000,000 and 1,000,000,000,000,200
$ ./primes 1000000000000000 1000000000000200 1000000000000037 1000000000000091 1000000000000159 1000000000000187