Monday, January 17, 2011

C++ - prime numbers

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.



3 comments:

John said...

Generate all prime numbers automatically in C++

John said...

Generate Prime numbers in C++
http://www.techyv.com/questions/c-prime-number-handling

mithun said...

I actually enjoyed reading through this posting.Many thanks.









Consulting - cPrime