//************************ // Bagheri. Naser //ProjectEuler Problem #7 //************************ #include using namespace std; bool check(int n) { if (n<= 1 or n % 2 == 0 ) {return false;} if(n==2) { return true;} int counter = 3; while ((counter * counter) <= n) { if (n % counter == 0)\ {return false; } else counter +=2; } return true; } //**************************************** int main() { int c=1; int n=1; while (c < 10001) { n=n+2; if (check(n)==true) {c++;} } cout<