title: Getting a for loop to work with negative numbers
body: <p>Write a loop that sets each array element to the sum of itself and the next element, except for the last element which stays the same. Be careful not to index beyond the last element. Ex:
  Initial scores:        10, 20, 30, 40
  Scores after the loop: 30, 50, 70, 40
  The first element is 30 or 10 + 20, the second element is 50 or 20 + 30, and the third element is 70 or 30 + 40. The last element remains the same. 
  <strong><em>This is a homework question that I need help with.</em></strong>
  What I am having problems with is if the bonusScores are negative the example it uses against my code is -100, -200, -300 , -400, -500.</p>
  
  <pre><code>include&lt;stdio.h&gt;
  
  int main(void)
  {
      const int SCORES_SIZE = 4;
      int bonusScores[SCORES_SIZE];
      int i = 0;
  
      bonusScores[0] = 10;
      bonusScores[1] = 20;
      bonusScores[2] = 30;
      bonusScores[3] = 40;
  
      /* Your solution goes here  */
      for (i = 0; i &lt; SCORES_SIZE; i++)
      {
          if (( bonusScores[i] &lt;= bonusScores[i +1] ) || (bonusScores[i] &lt; bonusScores [i+1]))
          {
              bonusScores[i] = (bonusScores [i] + bonusScores[i+1]);
          }
          else
          {
              bonusScores[i] = bonusScores[i];
          }
      }
      for (i = 0; i &lt; SCORES_SIZE; ++i)
      {
          printf("%d ", bonusScores[i]);
      }
      printf("\n");
  
      return 0;
  }
  </code></pre>