Skip to content

Commit 843e4c7

Browse files
fixed the using namespace std
1 parent 0856466 commit 843e4c7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

snippets/cpp/math-and-numbers/sieve-of-eratosthenes.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ author: dibyam-jalan27
77

88
```cpp
99
#include <vector>
10-
11-
using namespace std;
12-
13-
vector<int> sieve_of_eratosthenes(int n) {
14-
vector<bool> is_prime(n + 1, true);
15-
vector<int> primes;
10+
std::vector<int> sieve_of_eratosthenes(int n) {
11+
std::vector<bool> is_prime(n + 1, true);
12+
std::vector<int> primes;
1613
is_prime[0] = is_prime[1] = false;
1714
for (int i = 2; i * i <= n; ++i) {
1815
if (is_prime[i]) {

0 commit comments

Comments
 (0)