A standard improvement when looking for primes is to only look for factors up to the square root of the number. I've highlighted this in red (n.b. I'm assuming this function is named sqrt, as it is...
CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
Search:Type: Posts; User: Peter_B Search: Search took 0.03 seconds.
Results 1 to 1 of 1
|
Click Here to Expand Forum to Full Width |