I'm doing some error correcting, and I need to divide two digits under mod 11 in Java.
Now this I know, from using a modular calculator:
9/1 mod 11 = 9
2/10 mod 11 = 9
The problem comes in getting Java to calculate this. In Java:
(9 / 1) % 11 = 9 - This is fine
(2 / 10) % 11 = 0 - This is not correct.
I know that Java cannot technically perform modular operations, and part of me is thinking that I either need to somehow calculate the inverse, or use an array to store the possible output values.