title: multiplicative persistence - recursion?
body: <p>I'm working on this:</p>
  
  <blockquote>
    <p>Write a function, persistence, that takes in a positive parameter num
    and returns its multiplicative persistence, which is the number of
    times you must multiply the digits in num until you reach a single
    digit.</p>
    
    <p>For example:</p>
    
    <p>persistence(39) == 3 // because 3*9 = 27, 2*7 = 14, 1*4=4
                          // and 4 has only one digit</p>
    
    <p>persistence(999) == 4 // because 9*9*9 = 729, 7*2*9 = 126,
                           // 1*2*6 = 12, and finally 1*2 = 2</p>
    
    <p>persistence(4) == 0 // because 4 is already a one-digit number</p>
  </blockquote>
  
  <p>This is what I tried:</p>
  
  <pre class="lang-cs prettyprint-override"><code>  public static int Persistence(long n)
          {
              List&lt;long&gt; listofints = new List&lt;long&gt;();
  
             while (n &gt; 0)
              {
                  listofints.Add(n % 10);
                  n /= 10;
              }
              listofints.Reverse();
              // list of a splited number
  
              int[] arr = new int[listofints.Count];
              for (int i = 0; i &lt; listofints.Count; i++)
              {
                  arr[i] = (int)listofints[i];
              }
              //list to array
  
              int pro = 1;
              for (int i = 0; i &lt; arr.Length; i++)
              {
                  pro *= arr[i];
              }
              // multiply each number
              return pro;
          } 
  </code></pre>
  
  <p>I have a problem with understanding recursion - probably there is a place to use it. Can some1 give me advice not a solution, how to deal with that? </p>