Go to the documentation of this file.
36 #ifndef GTEST_SAMPLES_PRIME_TABLES_H_
37 #define GTEST_SAMPLES_PRIME_TABLES_H_
47 virtual bool IsPrime(
int n)
const = 0;
58 if (
n <= 1)
return false;
60 for (
int i = 2;
i*
i <=
n;
i++) {
62 if ((
n %
i) == 0)
return false;
69 for (
int n =
p + 1;
n > 0;
n++) {
107 for (
int i = 2;
i*
i <= max;
i +=
i%2+1) {
113 for (
int j =
i*
i; j <= max; j +=
i) {
126 #endif // GTEST_SAMPLES_PRIME_TABLES_H_
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:57