Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005
    Location
    Burlington, VT
    Posts
    181

    Checking for prime.

    What would be the easiest and most efficiant way for a program to check if a number in a field is prime, I already have a block of code that determains what a number is divisable by but I am afraid if I add in some thing that assumes it is prime if it isn't divisable by somthing >100 it will make debuging too hard.


    Thanks

  2. #2
    Join Date
    Oct 2002
    Location
    Leicester, UK
    Posts
    3,335
    There is a sample function for determining if a number is prime here: http://www.freevbcode.com/ShowCode.asp?ID=1059
    Forget the username, call me Keith

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •