I was reading about algorithms the other day and came to know of a faster algorithm to find prime numbers. It is called the Sieve of Eratosthenes. When I compared the execution times of this algorithm to the one I coded, the times were remarkably faster. A very simple and impressive algorithm to find prime numbers less than a number n.
Generate all prime numbers automatically in C++
ReplyDeleteGenerate Prime numbers in C++
ReplyDeletehttp://www.techyv.com/questions/c-prime-number-handling
I actually enjoyed reading through this posting.Many thanks.
ReplyDeleteConsulting - cPrime