Why this is not working Please tell me the error in this one

Why this is not working
Please tell me the error in this one

Hello @cbcao263,

There is mistake in your code.
I have correct it.


Refer to comments for better understanding.

Hope, this would help.
Give a like if you are satisfied.

Sir, I have made some comments in that code, asking for doubts, Please check that and tell If I am right.

Hey @cbcao263,

Please share that code.
I cannot find any comments.

I just wanna ask that Why you took i*i<1000000 and why 100000000 is not valid.

Hello @cbcao263,

I have used 100000000.
Because we have to find the prime numbers up to this number and as per sieves, the outer loop iterates for sqrt(n) time.

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.