If I add all the numbers from 1-100 what do I get? This question has been confusing me for a while...
5 answers
901
you get 5050
5050
The formula for calculating the sum of consecutive number is
S = n*(a1 + an) / 2
where
n = number of terms
a1 = first number
an = last number
Since it is from 1 to 100, n = 100. Substituting,
S = 100*(1+100)/2
S = 5050
Hope this helps~ :)
S = n*(a1 + an) / 2
where
n = number of terms
a1 = first number
an = last number
Since it is from 1 to 100, n = 100. Substituting,
S = 100*(1+100)/2
S = 5050
Hope this helps~ :)
You can also do it quickly as Gauss discovered when he was a child.
Consider all the numbers as if written in two lines.
1-50 ascending
100-51 descending
adding the two numbers that are in the same positions, each pair makes 101. There are 50 such pairs, so the sum is 5050.
Consider all the numbers as if written in two lines.
1-50 ascending
100-51 descending
adding the two numbers that are in the same positions, each pair makes 101. There are 50 such pairs, so the sum is 5050.