Find primes using Sieve of Eratosthenes
for ( int i = 2 ; i <= limit ; ++ i ) { if ( mark [ i ] == false ) { prime . push_back ( i ) ; for ( int j = i ; j <= limit ; j += i ) { mark [ j ] = true ; } } } }