Summation of array elements
-
Hi, I am looking for help with writing a small custom code to sum some elements (about 25 to 35 elements) of an array with 100 elements.
I tried the following code but it did not work and I don't know what else to do.
for (int iArray = ArraySize(array) - 1; iArray >= 0; iArray--) summation += array[iArray];The only other choice I have is to sum them manually, that is, sum=var1+var2+...var35. This will work but is clumsy and I can only modify the calculation manually.
Please help, thanks.
-
This is the field of expertise or roar. I hope he con help you. I'm not good at arrays.