I want to sum elements in an array. For example I have an array
[183948, 218520, 243141, 224539, 205322, 203855, 233281, 244830, 281245,
280579, 235384, 183596, 106072, 88773, 63297, 38769, 28343]
I want to sum it in three different parts which are the first three elements, the next 10 elements and the rest. My only idea is to separate the array and use sum method. Is there better way to do it? Thanks in advance!
forloop to go through them