Skip to content

Latest commit

 

History

History
executable file
·
14 lines (10 loc) · 520 Bytes

w07d5.md

File metadata and controls

executable file
·
14 lines (10 loc) · 520 Bytes

Assessment

Week 7 | Day 5

  • 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!