When you divide a number by 10, the remainder is the last digit. For example, 12345÷10=1234 with remainder 5.
So the last digit of n is nmod10. This works for any positive integer.
Similarly, ⌊n/10⌋ removes the last digit. If n=12345, then ⌊n/10⌋=1234.