title: multiplying each element of one array by all the elements of a second array
body: <p>I am having a difficult time multiplying elements that are in two array's.  </p>
  
  <pre><code>    int[] firstArray = { 1,2,3,4 };
      int[] secondArray = { 10,20,30,40 };
  </code></pre>
  
  <p>I need to multiply the first element of the "firstArray" by each of the elements in the "secondArray". Then take the second element of the "firstArray" by each of the elements in the "secondArray", and so on until i have multiplied all of the elements in the first array by each of the elements in the second array.</p>
  
  <p>so far I have figured out how to get the first element to do this by building a 3rd array</p>
  
  <pre><code>    int[] thirdArray = [4]
  
      for (int counter = 0; counter &lt; thirdArray.Length; counter ++)
      thirdArray[counter] = firstArray[counter] * secondArray[counter];
      console.WriteLine(thirdArray[counter]);
  </code></pre>
  
  <p>This just takes the elements of the first array and directly multiply across to the second element. I should have 16 int results but if I change the thirdArray to [16] there is a out of range exception.
  if you can help it would be greatly appreciated. </p>