title: Multiplying up to 20 numbers of 30 digits
body: <p>I was given a task to multiply up to 20 numbers of 30 digits.I figured out an algorithm to multiply two numbers with 30 digits by going on the digits of both numbers in two loops with quadric complexity. (I think the best way to approach 30 digits is to store the digits of the numbers in an 2D integers array with 20 numbers and each one of them has 30 free slots to fill their digits in these slots) the result will
  be stored in an array of 30 digits. Now here are my questions and problems:</p>
  
  <ol>
  <li><p>How can I multiply more than 2 numbers of 30 digits at once? which kind of loop should I use? I figured out how to multiply only 2 numbers of 30 digits.</p></li>
  <li><p>getting the numbers in which you want to multiply from the user is another issue like while getting numbers you must know that each one of these numbers has max 30 digits to fill like if I want to get the number 52 from the user I dont to enter 52 and 28 zeros after that like just 52 itself like:</p></li>
  </ol>
  
  <p>Input: 520000000000000000000000000000 is WRONG</p>
  
  <p>Input: 52 is RIGHT if we didnt enter 28 zeros after 52 itself.</p>
  
  <p>Here is my algorithm to multiply 2 numbers with 30 digits:</p>
  
  <pre><code>for (i = 29; i &gt;= 0; i--)
   {
      for (j = 29, carry_in = 0; j &gt;= 0; j--) 
      {
          n =number_1[i] * number_2[j] + result[i] + carry_in;
          carry_in = n / 10;
          result[i] = (n % 10);
      }
      result[i] += carry_in;
   }
  </code></pre>