The additive persistence of an integer, n, is the number of times you have to replace n with the sum of its digits until n becomes a single digit integer. The multiplicative persistence of an integer, n, is the number of times you have to replace n with the product of its digits until n becomes a single digit integer. This program calculates the solutions for these problems for a given integer.
Based on problem from: https://edabit.com/challenge/fKZ6m9rDHDvgp6aeu