this is the link
Why my code is showing run time error
There are 2 issues with your code. Firstly you need to print Nth prime which may be of the order 10^8 but your array is of size 10^5. Secondly, your sieve code is also wrong.
It should be j = i*2 and not j = i*i in the inner loop.
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.