What is the best logic to find prime numbers using a loop in…

Hi, I need help implementing an efficient algorithm to find prime numbers in C++.

I want to know the best logic to do this using a loop. Could you please provide a step-by-step explanation of the logic (especially regarding optimization, like checking up to the square root) and a clean C++ code example?

!

WRITE MY PAPER


Comments

Leave a Reply