Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prime Numbers
Message
De
19/03/2005 20:44:52
Neil Mc Donald
Cencom Systems P/L
The Sun, Australie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00996605
Message ID:
00997647
Vues:
19
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform