Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Prime Numbers
Message
From
19/03/2005 20:44:52
Neil Mc Donald
Cencom Systems P/L
The Sun, Australia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00996605
Message ID:
00997647
Views:
17
Hi,
Thanks for the ideas, they answered a few questions I had, but also posed a few others, back to do some more testing.

Thanks a lot.

>Neil,
>
>You can probably find an algorithm with a google.
>
>One way is to check to see if it's divisible by 2 first and if it is N not prime, if it's not loop through all odd numbers > 1 and < = than the int( sqrt( N ) ) and see if N is evenly divisible by it. If it is the number is not prime.
>
>>Does anyone have a simple/fast algorithm/formula for proving that a selected number is a prime.
Regards N Mc Donald
Previous
Reply
Map
View

Click here to load this message in the networking platform