title: bubble sort in descending order
body: <pre><code>int main()
  {
      int a[7] = {4,33,11,8,12,123,2}, temp;
  
      for (int i = 7; i &gt;= 0; i--)
      {
          for (int j = 7; j &gt; 7 - i; j--)
          {
              if (a[j] &gt; a[j - 1])
              {
                  temp = a[j];
                  a[j] = a[j - 1];
                  a[j - 1] = temp;
              }
          }
      }
  
      for (int i = 0; i &lt; 7; i++)
          cout &lt;&lt; a[i] &lt;&lt; &quot; &quot;;
  
  }
  </code></pre>
  <p>Hey, I want to sort numbers for bubble descending sort, but I have a problem, my code works with (ai &gt;= 0) and when I enter negative numbers wrong output is given.
  for example when i entered {4,33,-1,8,12,123,2}, output is</p>
  <pre><code>123 33 12 8 4 2 0
  </code></pre>