Print some fun information at the end.
This commit is contained in:
parent
c2f0fb0ffd
commit
d8c81b172b
@ -62,15 +62,18 @@ nextPrime:
|
|||||||
mpz_add_ui(num, num, 2);
|
mpz_add_ui(num, num, 2);
|
||||||
} while(run);
|
} while(run);
|
||||||
|
|
||||||
|
printf("Found %zu primes\n", primes.end);
|
||||||
|
puts("Clearing memory...");
|
||||||
// Clear GMP variables
|
// Clear GMP variables
|
||||||
mpz_clear(halfNum);
|
mpz_clear(halfNum);
|
||||||
mpz_clear(num);
|
mpz_clear(num);
|
||||||
// Deinitialize the list
|
// Deinitialize the list
|
||||||
deInitList(&primes);
|
deInitList(&primes);
|
||||||
|
|
||||||
|
puts("Exit successful.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void leave() {
|
void leave() {
|
||||||
puts("Exiting...\n");
|
|
||||||
run = false;
|
run = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user