algorithm for finding the digital root of a number. Completed in response to reddit.com/r/dailyprogrammer #122