+ 3

Need algorithm!!!

I want to make a cpp program to find prime numbers upto n number but i don't know the algorithm...can anybody help me with this...thank u

21st Sep 2017, 5:36 AM
Prabhjot Khakh
Prabhjot Khakh - avatar
3 Antworten
+ 9
Go to Code Playground section and use the Search bar entering keyword "prime" you'll find plenty of examples to learn from. Good luck!
21st Sep 2017, 6:08 AM
Ipang
+ 2
Eratosthenes sieve.
21st Sep 2017, 5:56 AM
Sergey Antonyuk
Sergey Antonyuk - avatar