The modulo (sometimes called modulus) operation finds the remainder of division of one number by another
This is one of the four elementary, mathematical operations of arithmetic; with the others being addition, subtraction and division.
"Also integer multiplying is less expensive so you may just do the divide first and calculate the modulo 10"
from question "Best way to check if there is a 0 in an integer"
"More generally you can always just try multiplying the base by itself a number of times no greater than the modulo and you are bound to find a cycle"
from question "Find the number modulo"