title: Multiply each element from an array with each element from a second array
body: <p>So we have to use functions to fill, multiply and print arrays.
  So I created 3 functions: one to fill the arrays, one to print the arrays, and one to multiply the first 2 arrays between them. 
  I have to use the print function 3 times: to print the initial 2 arrays and to print the array resulting from multiplication of the first 2 arrays. 
  The problem I have is when I want to use "multiplication" function in order to multiply each element from the first array with every element from the second array.  I am doing something wrong with this function because when I try to launch it freezes.</p>
  
  <p>It should work like this:
  First array: 5, 5, 5;
  Second array: 5, 10;
  I should get this:
  25, 25, 25, 50, 50, 50;</p>
  
  <p>This is my code so far:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  void remplir(int array[], int dim); //function to fill array
  void aficher(int array[], int dim); //function to print array
  int multiplier(int array11[], int array22[], int dim1, int dim2, int   dim3); //function to multiply array
  
  
  int main() {
  int a1, a2, a3, array1[a1], array2[a2];
  cout &lt;&lt; "La dimension de la premiere table?" &lt;&lt; endl;
  cin &gt;&gt; a1;
  while (a1 &gt; 20) {
      cout &lt;&lt; "La dimension maximum est 20! Reessayez!" &lt;&lt; endl;
      cin &gt;&gt; a1;
  
  }
  remplir(array1, a1);
  aficher(array1, a1);
  
  cout &lt;&lt; "La dimension de la deuxieme table?" &lt;&lt; endl;
  cin &gt;&gt; a2;
  while (a2 &gt; 20) {
      cout &lt;&lt; "La dimension maximum est 20! Reessayez!" &lt;&lt; endl;
      cin &gt;&gt; a2;
  
  }
  a3 = a1 * a2;
  remplir(array2, a2);
  aficher(array2, a2);
  
  multiplier(array1, array2, a1, a2, a3);
  
  return 0;
  
  }
  
  void remplir(int array[], int dim) {
  int i = 0;
  for (i = 0; i &lt;= dim - 1; i = i + 1) {
      cout &lt;&lt; "Entrez la case numero " &lt;&lt; i &lt;&lt; endl;
      cin &gt;&gt; array[i];
  
  }
  }
  
  void aficher(int array[], int dim) {
  int i;
  for (i = 0; i &lt;= dim - 1; i = i + 1) {
      cout &lt;&lt; "indice " &lt;&lt; i &lt;&lt; " = " &lt;&lt; array[i] &lt;&lt; endl;
  }
  }
  
  int multiplier(int array11[], int array22[], int dim1, int dim2, int      dim3) {
  int i = 0, a = 0, resultat[dim3];
  for (i = 0; i &lt;= dim1 - 1; i = i + 1) {
      for (i = 0; i &lt;= dim2 - 1; i = i + 1) {
  
          resultat[i] = array11[a] * array22[i];
  
      }
      a = a + 1;
  }
  
  return resultat[i];
  
  }
  </code></pre>