Modulo arithmetic has to do with "special" division between integers. Modulo arithmetic is often used as a hashing function to generate a key to be used as address location for storage of data into Tables, Files and Memory. The same method can be used to retrieve data.
Can you state which kind of Primitive Data declarations are suitable for Modulo Arithmetic in Java?
Example
25 DIV 9 = 2 result integer (gives how many times 9 can divide 25)
25 MOD 9 = 7 result integer (gives the remainder of the divisiion)
example Java course code for the above (but not the only one, why? )
int d,m;
d = 25 / 9;
m = 25 % 9;
Read Liang book with the program for the milliseconds, and then try to complete the ATM (Automatic Teller Machine) exercise 6.
Can you state which kind of Primitive Data declarations are suitable for Modulo Arithmetic in Java?
Example
25 DIV 9 = 2 result integer (gives how many times 9 can divide 25)
25 MOD 9 = 7 result integer (gives the remainder of the divisiion)
example Java course code for the above (but not the only one, why? )
int d,m;
d = 25 / 9;
m = 25 % 9;
Read Liang book with the program for the milliseconds, and then try to complete the ATM (Automatic Teller Machine) exercise 6.