Hi there, I have read through the search result of the Modulus operator and could not find the answer to my question, so, I post my question here.
In mathematic term: a = dq+r, where "a" is an integer and "d" is a dividend and q is a quotient, "r" is the remainder. In
java, we can use "%" to get a reminder of a division. e.g
m=101, n=11, 101%11=2, if we just know "m=100" and the reminder (2), how can we get "n" in java?
In reality, everyone can calculte in their head and get the solution, how can I write the code in java to get the solution? e.g 101%n=2, how to solve n?
Waiting for help!
Thanks!
Mindy