补全下面的埃氏筛法的代码,求出从2到n中的质数数量。
#include <iostream>
#include <cmath>
using namespace std;
int n, b[10000005], ans;
int main() {
cin >> n;
for(int i=____1____; i<=____2____; i++) {
if(b[i]==____3____) {
for(int j=____4____; j<=____5____; j+=____6____)
b[j] = 1;
}
}
for(int i=____7____; i<=____8____; i++)
if(b[i]==0)
ans ___9____;
cout << ans;
return 0;
}