https://ide.codingblocks.com/s/28336 in this code i am not understanding what is happening here
while(N && counter<100000000)
{
counter++;
if(!sieve[counter])
Nā;
}
cout<<counter;
}
Deepak and Primes
It calculates nth prime number
but kaise chal raha hai ye?
yahi samjh nahi aaya
First we calculate the prime numbers using sieve method. Then we run a while loop which decreases n by 1 if we encounter a prime. if n==0 the loop stops and we print nth prime then.
Try this:
Updated the code:

