title: Multiply each element in array by all other elements in same array
body: <p>I am trying to create a times table in Ruby in which an integer is given and the output is a times table for that integer.</p>
  
  <p>EXAMPLE: <code>times_table(5)</code></p>
  
  <p>results in:</p>
  
  <pre><code>1   2   3   4   5
  2   4   6   8  10   
  3   6   9  12  15   
  4   8  12  16  20   
  5  10  15  20  25
  </code></pre>
  
  <p>So far I have:</p>
  
  <pre><code>def times_table(rows)
    table_array = (1..rows).to_a
  
    table_array.each do |i|
  
  end
  
  times_table(5)
  </code></pre>
  
  <p>With table_array, I can get <code>[1,2,3,4,5]</code>, but I need to have the result be <code>1 * 2 , 1 * 3, 1 *  4, 1 * 5, 2 * 1, 2 * 2, 2 * 3</code> etc. Basically, I need the first element to multiple itself with all other elements in the array and then move on to the next element. Any ideas on how to do this?</p>