I have a very basic and simple question that I just cannot figure out myself. I spent several hours trying and looking in the help, but no dice.
I have a List (r) which contains some Integers. I have made a Do loop to get all the sums of all Integers up to Integer[[i]]
r = {0, 1 , 4, 3, 1, 3, 4 , 8 };
length = Length[r];
m = 0;
rAdded = Do[Print[m = m + r[[i]] ], {i, 1, length}]
This gives the correct sums : 0 1 5 8 9 12 16 24
The thing is, I need them in a new List, not as a printout on my screen.
I tried with List[], Table[] and more, but nothing works.
So the result should be in the form of newList ={0,1,5,8,9,12,16,24}
But how do I do that?