Originally Posted by mkrahmeh
its useful indeed..thx
but note that your algorithm considers 1 as a prime and discards 2..
actually 1 is not a prime
, and 2 is the only even prime..
1 has no integral factors but itself and 1, therefor is prime,