35.0k views
3 votes
Find the difference between the sum of all even numbers and the sum of all odd numbers from 0 through 1000.

1 Answer

4 votes
Think of it this way for eery even number there is an odd number that +1 it so if you find the difference between those it is 1
(EX: 1 and 2) (EX: 1+3 and 2+4)
so there are 500 odd numbers so when you add it up the evens add up 500 more
User Harith
by
6.2k points