Problem nprime
User brianl
Submission Time 2026-06-24 16:40:46
Score 0
Max Time N/A
Max Memory N/A

Compile Error

nprime.cpp: In function ‘int main()’:
nprime.cpp:2:29: error: ‘cin’ was not declared in this scope
2 | int max = 10000, n = 0; cin >> n;
| ^~~
nprime.cpp:3:5: error: ‘vector’ was not declared in this scope
3 | vector<int> prime(max, 1);
| ^~~~~~
nprime.cpp:3:12: error: expected primary-expression before ‘int’
3 | vector<int> prime(max, 1);
| ^~~
nprime.cpp:6:13: error: ‘prime’ was not declared in this scope
6 | if (prime[i]) {
| ^~~~~
nprime.cpp:14:5: error: ‘cout’ was not declared in this scope; did you mean ‘count’?
14 | cout << nth_prime << endl;
| ^~~~
| count
nprime.cpp:14:26: error: ‘endl’ was not declared in this scope
14 | cout << nth_prime << endl;
| ^~~~