title: How to convert a 1d array to 2d array?
body: <p>Say, I have a 1d array with 30 elements:</p>
  
  <pre><code>array1d[0] = 1  
  array1d[1] = 2  
  array1d[2] = 3  
  .  
  .  
  .  
  array1[29] = 30
  </code></pre>
  
  <p>How to convert the 1d array to 2d array?<br>
  Say 10x3?</p>
  
  <pre><code>array2d[0][0] = 1 array2d[0][1] =2 array2d[0][2] =3
  .
  .
  .
  array2d[9][0] = 28 array2d[9][1] =29 array2d[9][2] =30
  </code></pre>
  
  <p>Should I use a for loop?<br>
  But I cannot work it out.</p>