title: Checking to see if 2 numbers in array sum to 0 in Ruby
body: <p>I've been going at this problem for a few hours, and I can't see why I can't get it to run properly.  The end game to this method is having 2 numbers in an array equaling zero when added together. Here is my code:</p>
  
  <pre><code>def two_sums(nums)
      i = 0
      j = -1
      while i &lt; nums.count
          num_1 = nums[i]
          while j &lt; nums.count
          num_2 = nums[j]
              if num_1 + num_2 == 0
                  return "There are 2 numbers that sum to zero &amp; they are #{num_1} and #{num_2}."
              else
                  return "Nothing adds to zero."
              end             
          end
      i += 1
      j -= 1
      end
  end
  </code></pre>
  
  <p>The problem I'm having is unless the first and last number in the array are the positive and negative of the same number, this will always return false.</p>
  
  <p>For example, if I had an array that was [1, 4, 6, -1, 10], it should come back true.  I'm sure my 2 while statement is the cause of this, but I can't think of a way to fix it.  If someone could point me in the right direction, that would be helpful.</p>