title: Cumulative sum of an Array
body: <p>So i'm working on a problem that focuses on taking the cumulative sum of an array so for example if i have an array of ({0,2,3,-1,-1}) it returns {0,2,5,4,3}... or if you have an array of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] it should return [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]... </p>
  
  <p>Right now i'm struggling with two problems one i have to use the method given and i'm struggling with what to return because total will not.. To my code i know it works for adding up the sum of an array but not the cumulative sum as in my examples.. any guidelines would be helpful.</p>
  
  <pre><code>public int[] makeCumul(int[] in) {
      int[] out = { in.length };
      int total = 0;
      for (int i = 0; i &lt; out.length; i++) {
          total += out[i];
      }
      return total;
  }
  </code></pre>