#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    22
    Rep Power
    0

    Question Simple arithmetic based question


    I'm working on a script right now, and basically I'm stuck at one point. I have figured out how to determine whether or not an interger is divisible by 2 (even %2), but I have yet to figure out how to determine if a number is divisible by another number.

    Basically, I need to determine whether or not a number is divisible by 6.

    An actual code example would be extremely helpful. Thanks in advance.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    138
    Rep Power
    11
    I think the solution could be found by doing mod 6 as you are doing for 2. 36%6 == 0. I hope this is helps
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    22
    Rep Power
    0

    .


    Yep, that did the trick. Thanks a lot that was exactly what I needed.

IMN logo majestic logo threadwatch logo seochat tools logo