I need to create an array with 100 numbers (1-100) and then calculate how much it all will be (1+2+3+4+..+100 = sum).
I don\'t want to enter these numbers into the a
If your array of numbers always is starting with 1 and ending with X then you could use the following formula: sum = x * (x+1) / 2
from 1 till 100 the sum would be 100 * 101 / 2 = 5050