For practical everyday use, have a look in the RSA crypto system. Also,
http://en.wikipedia.org/wiki/Modular_arithmetic.
hth
cheers
the division algorithm
You have 3123 paint balls and you have a gun to load 13 paint-balls
and hit them to 13 of your chosen friends, but you can only load the
gun with 13 paint-balls at once, not less than that. How many
paint-balls will be remaining when you are done with loading, firing,
loading... as many times as you can.
Answer: 3123 mod 13 = 3
Notice that the modulus (remainder) is also used in the division
process itself, if you divide the above manually.
13*2 = 26
31 mod 13 = 31 - 26 = 5
get 2 down
repeat with 52....
jaH
> http://en.wikipedia.org/wiki/Modular_arithmetic.
sorry for the typo