title: Finding the max sum of successive random numbers in an array
body: <p>I have an array of 25 random integers between -100 and 100.</p>
  
  <p>For example my array can look like this:
  -10, 23, 19, -11, 3, -9, -8, 4, 10, 20, 30, 40, 50, -6, -2, 1, -9, 8, -6, 20, -21, -3, -2, -4, -7</p>
  
  <p>I wish to write a method that receive my array as a parameter, and prints out the following: the first index, the last index, and the sum of the successive elements between them, that will give the possible maximum sum.</p>
  
  <p>For my example the output will be: first index: 1 (value: 23), last index: 19 (value:20), total sum: 177</p>
  
  <p>I don't know how I should deal with this problem. I wrote a code, but it's very complex and unefficient because I used a list to store all the possible sums. 
  Can you please show a Pseudo-code for this problem, or code in c#? </p>