Uncle Arthur is completely mad. He adds up all of the even numbers
between 0 and 1000 (including the number 1000), then he adds up all
of the odd numbers between 0 and 1000, and finally he calculates the
difference between the two totals. What answer does he get?
THE FORMULA FOR SUM OF EVEN NUMBERS IS N(N+2)/4 SO
WE HAVE TO PUT THE VALUE OF N AS 1000 ,THAT MEANS
THE SUM OF ODD NUMBERS IS N*N/4
HERE AGAIN N IS 1000
THE DIFFERENCE BETWEEN THE TWO TOTALS = 250500-250000=500.