[SOLVED] Sum of numbers between 2 numbers, formula?

Hi,

Sorry if this is in the wrong section, I did maths a year and a bit back in high school and im doing computing at uni, and I'm not sure on the exact formula I need.

I need it to double check that my program is outputting the right sum.

I need the formula to calculate the sum of the numbers between 200 and 300 inclusively.

the sum my program is giving me is 25250

I cant even remember doing this with numbers being inclusive or exclusive.

so could someone please explain the difference between inclusive and exclusive numbers, and the formula I need to be using?

thx