sir/ma’am
If I don’t use long long int in the loop with variable i it is not giving correct answer.(here b = 1000000)
here i is int and it can take og b = 1000000
why is this so .
for(int i = 3 ; i <=b ; i+=2){
if(prime[i] == 1){
for(long long int j = i*i ; j <= b ; j = j + i){
prime[j] = false;
}
}
}
please reply
