Prateek love candy

i don’t know how to find out prime number of the order 10^6.
what approach i should follow?

@Sahil_Garg you can refer sieve of eratosthenes in your course content.

Hey Sahil,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.