title: How to find single digit from a set of number by doing product of each numbers in java
body: <p>I have a number like 99
  now I need to get a single digit number like -</p>
  
  <pre><code>9*9 = 81
  8*1 = 8
  
  ex2:
  3456 3*4*5*6
  360 3*6*0
  </code></pre>
  
  <p>What will be the efficient way to get the output beside change the number to character/string then multiply with each adjacent .</p>
  
  <p>Let me make the problem little more complex , what if I want to get the number of steps required to make the N to a single digit , then recursion may loose the steps and need to be done in a single method only</p>