diff --git a/cplusplus/src/tests/test_is_prime.cpp b/cplusplus/src/tests/test_is_prime.cpp index eaa8fa62..cc923b52 100644 --- a/cplusplus/src/tests/test_is_prime.cpp +++ b/cplusplus/src/tests/test_is_prime.cpp @@ -1,4 +1,5 @@ #include +#include #include "../include/primes.hpp" #ifndef MAX_PRIME @@ -7,9 +8,8 @@ int main(int argc, char const *argv[]) { // prints number, is_prime(), is_composite(), prime index or -1 - PrimeGenerator pc = primes_until(MAX_PRIME); - uintmax_t i, p, prev = 0, count = 0; - p = pc.next(); + PrimeGenerator pc = primes_until(MAX_PRIME); + uint64_t i, prev = 0, count = 0, p = pc.next(); while (p < MAX_PRIME && pc.has_next()) { for (i = prev + 1; i < p; i++) std::cout << i << " " << is_prime(i) << " " << is_composite(i) << " -1" << std::endl;