find the sum of numbers between 1 to 100
Answers
5050
Step-by-step explanation:
this is the correct answer
Answer:
5050
Step-by-step explanation:
A simple general solution for solving a sum of a number series is to
- Calculate the pairwise sum Lowest number in series + Highest number in series
- Count/calculate the number of pairs
- Multiply number of pairs with pairwise sum
- If odd numbered series: Add the unpaired center number
Since your question starts with the number 1, we can decide if we want to handle that specific series (even, 100 numbers) or add the 0 to make it odd without affecting the total sum.
I’ll do both.
For the odd series:
0 + 100 = 100
1 + 99 = 100
…
48 + 52 = 100
49 + 51 = 100
- The pairwise sum is 100.
- The number of pairs are 50.
- The sum of all pairs are 50*100 = 5000
- We add the unpaired center number 5000 + 50 = 5050
For the even series:
1 + 100 = 101
2 + 99 = 101
…
49 + 52 = 101
50 + 51 = 101
- The pairwise sum is 101.
- The number of pairs are 50.
- The sum of all pairs are 50*101 = 5050
- No unpaired center number
At first glance, choosing a odd series when you could choose an even, increases the complexity and should be avoided. In practice, that extra step is not a big thing compare to setting up your pairs and doing the multiplication. In the example above, choosing the odd series with the simpler pair set up and easier calculation is at least for me a quicker way to solve the problem.