Skip to content
Permalink
Browse files

Refactor

  • Loading branch information...
Kim Walisch
Kim Walisch committed Apr 23, 2018
1 parent 623fe28 commit 5bd023881103ad31c918fbac9546696df5ee6ed3
Showing with 3 additions and 2 deletions.
  1. +1 −1 examples/c/prev_prime.c
  2. +1 −0 examples/cpp/nth_prime.cpp
  3. +1 −1 examples/cpp/prev_prime.cpp
@@ -14,7 +14,7 @@ int main()
primesieve_skipto(&it, 2000, 1000);
uint64_t prime;

/* iterate over the primes from 2000 to 1000 */
/* iterate over primes from 2000 to 1000 */
while ((prime = primesieve_prev_prime(&it)) >= 1000)
printf("%" PRIu64 "\n", prime);

@@ -9,6 +9,7 @@
int main(int, char** argv)
{
uint64_t n = 1000;

if (argv[1])
n = std::atol(argv[1]);

@@ -10,7 +10,7 @@ int main()
it.skipto(2000);
uint64_t prime = it.prev_prime();

// iterate over the primes from 2000 to 1000
// iterate over primes from 2000 to 1000
for (; prime >= 1000; prime = it.prev_prime())
std::cout << prime << std::endl;

0 comments on commit 5bd0238

Please sign in to comment.
You can’t perform that action at this time.