extern crate slow_primes; use std::os; fn main() { let max = os::args().as_slice() .get(1).and_then(|s| from_str(s.as_slice())) .unwrap_or(1_000_000); let sieve = slow_primes::Primes::sieve(max); for (i, p) in sieve.primes().enumerate() { let (lo, hi) = slow_primes::estimate_nth_prime(i as u64 + 1); println!("{},{},{}", lo, p, hi); } }