Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Anyone up for Balancing DIV?

  1. Apr 16, 2005 #1
    DIV is an integer division in programming where you take only the whole number. EG 18 DIV 5 = 3. How do you make 18 subject of the formula? say you have this question:
    a DIV b = c (a)

    Also there is another function which is called MOD which returns the remainder of 2 numbers. EG 18 MOD 5 = 3. The previous question has to do with making *this* 18 subject of the formula (18 MOD 5 = 18-5[18 DIV 5]) so if you can answer this there's no need to answer the previous question.
    a MOD b = c (a)

    10x! :smile:
  2. jcsd
  3. Apr 16, 2005 #2

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    hmm, 3 mod 5=3, and 18 mod 5 =3. So what makes you think you can invert the formula? Do you simply mean

    x mod y = z is equivalent to y divides x-z, or if you prefer, there is a k such that x+ky=z.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook