[Omaha.pm] Talk about brute forcing a problem...
jhannah at omnihotels.com
Fri Apr 1 12:28:10 PST 2005
Just when I thought *I* was guilty of brute forcing things too much... -grin-
for ($count1=1;$count1 <= $prime_candidate / 2;$count1++)
for ($count2=1;$count2 <= $prime_candidate /2;$count2++)
if ($count1 * $count2 == $prime_candidate)
$truth = 0;
Wow. Aren't there smarter/faster mathmetical ways to find primes?
More information about the Omaha-pm