In equaltion,
x%3=2
how can i calculate x??
How many x do you want?
2 % 3 = 2
5 % 3 = 2
etc etc
DEXNOOBCODER (1)
In equaltion,
x%3=2
how can i calculate x??
|
x = anything*3+2
try it?
5*3 is 15, +2 is 17.
17%3 = ?
11*3 = 33, +2 = 35.
35%3 = ?
so its not any one X. its a great many values... {2,5,8, ... +3 forever}
Last edited on
x%3 == 2
x == 3n + 2 for any integer n
Not our fault the percent sign operator doesn't do proper modular arithmetic!
Last edited on
I think its a "remainder operator" not a "modulo operator". Restrict to non-negative n in this problem.
Last edited on