title: How to do calculations with array list elements.?
body: <p>I have an integer array list. It will always contain 5 integers. Now suppose it contains the numbers 10031. Now I want to do this calculation in the elements.</p>
  
  <p>Add the numbers within this number, until you are left with a 1 or 2 digit number.</p>
  
  <blockquote>
    <p>1.....0.....0.....3.....1 </p>
    
    <p>...1.....0......3....4 </p>
    
    <p>.......1.....3.....7 </p>
    
    <p>...........4....10 (When this occurs, separate into 1 + 0) </p>
    
    <p>..............5..1 = 51. Result is 51.</p>
  </blockquote>
  
  <p>I want the result when it is a double digit number. Please help.</p>