Find the sum of all integers from 1 to 100 inclusive.
Note
Pair numbers from ends: (1+100), (2+99), ... there are 50 pairs each summing to 101, so total is 50×101 = 5050.
Find the sum of all integers from 1 to 100 inclusive.
Pair numbers from ends: (1+100), (2+99), ... there are 50 pairs each summing to 101, so total is 50×101 = 5050.