Problem nprime
User chlq3x
Submission Time 2026-06-25 15:48:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

nprime.cpp:2:1: error: ‘usin’ does not name a type; did you mean ‘sin’?
2 | usin namespace std;
| ^~~~
| sin
nprime.cpp: In function ‘int main()’:
nprime.cpp:7:2: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
7 | cin >> n;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:75,
from nprime.cpp:1:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
nprime.cpp:8:2: error: ‘vector’ was not declared in this scope
8 | vector <int> primes; //store the prime values so far
| ^~~~~~
nprime.cpp:8:2: note: suggested alternatives:
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h