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.


John said...

Generate all prime numbers automatically in C++

John said...

Generate Prime numbers in C++

mithun said...

I actually enjoyed reading through this posting.Many thanks.

Consulting - cPrime