I didnt understand what we have to do in this question.
do we have to find the count of the prime numbers uptil the nth value??
this is my code, kindly comment out the errors.
Deepak and primes
You have to find the nth prime number . Like:
1st prime number is 2
2nd prime number is 3
3rd prime number is 5
See this code
You will get intuition
Can you please dry run this part of the code
I do not understand whats goin on here.
According to my intuition, first we are making a sieve of prime numbers.(i got this part).
But to find the nth prime no., this i cant figure out.

This for loop means that we will iterate out i till 1000000 okay? if we get a prime number we increase count of j every time. We get
first prime number j becomes 1 (i=prime number 2)
Second prime number j becomes 2 (i=prime number 3)
Third prime number j becomes 3 (i=prime number 5)
When the count becomes equal to n, we don’t iterate i, we just print i which is 5 in this case
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.