Extract the last digit of a random number, thus making it an integer value