I don't know what I'm doing wrong!!
Ok so the formula I have for finding the sum of consecutive numbers is
[n(n+1)]/2
I tested this formula out by using an easy range of numbers: 2 to 8
so the total number of numbers from 2 through 8 inclusive is: (8-2) + 1 = 7
So now I plug it into the formula: [(7(7+1)]/2 --> 56/2 = 28
so the sum of the integers from 2 to 8 inclusive is 28.....
HOWEVER
I checked this by adding 2+3+4+5+6+7+8 and that gives me 35.
What am I doing wrong????
Ok so the formula I have for finding the sum of consecutive numbers is
[n(n+1)]/2
I tested this formula out by using an easy range of numbers: 2 to 8
so the total number of numbers from 2 through 8 inclusive is: (8-2) + 1 = 7
So now I plug it into the formula: [(7(7+1)]/2 --> 56/2 = 28
so the sum of the integers from 2 to 8 inclusive is 28.....
HOWEVER
I checked this by adding 2+3+4+5+6+7+8 and that gives me 35.
What am I doing wrong????












