- In mathematics, the persistence of a number is the number of times one must apply a given operation to an integer before reaching a fixed point at which the operation no longer alters the number.
- The multiplicative persistence of 39 is 3, because it takes three steps to reduce 39 to a single digit: 39 → 27 → 14 → 4.
- Write a function to find the
multiplicative persistence
of a number. You must use recursion.
function multiplicativePersistence() {
}
Have fun!