title: concatenating array of integers in c
body: <p>I have run into some trouble trying to concatenate an array of integers into one number.  I understand how to do this with single digit numbers (my code below), but what if I was prompting a user to enter 5 numbers and they entered 12, 345, 552, 126, 44.  I need to develop an algorithm that will take the users input and concatenate it to make one integer, like this 1234555212644</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
  int main(void)
  {
  
      int num[3]={1, 2, 3}, n1, n2, new_num;
  
      n1 = num[0] * 100;
      n2 = num[1] * 10;
  
      new_num = n1 + n2 + num[2];
  
      printf("%d \n", new_num);
  
      return 0;
  }
  </code></pre>
  
  <p>output: 123</p>
  
  <p>Thanks in advanced.</p>