// Generate primes using the sieve of eratosthenes #include #include int main() { // TODO: make it work with GMP (https://gmplib.org/) unsigned int nextnumber { 3 }; bool notprime; std::vector primes; primes.push_back(2); // Initial prime std::cout << "2\n"; while (true) { notprime = false; for (unsigned int i=0;i