On Wed, 15 Nov 2000 [EMAIL PROTECTED] wrote:

> hi all
> i took the commen advice and i am teaching myself c++ ;-)

This is quite off topic ... but ...

> i have played with a few things and am going well but im stumped with a
> problem..
> 
> i decided to make a prime number generator. I started with
> plain brute force trying every combo and it all worked well.

try a search on google for "the sieve of erastothenes" or somtehing
like that ... it is the classic algorithm for finding primes.
brute force will get you nowhere ;^)

why C++ would help you with a problem like this is beyond me :)

O-O integer perhaps? if (number(9).isprime()) { dothis();) } ???


--
Rick Welykochy || Praxis Services
"Tired of being a crash test dummy for Microsoft? Try Linux" 




-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to