2
Chat with our AI personalities
No, the product is, but not the sum. 0 + 2 = 2
int i, sum = 0; for (i=0; i<20; i+=2) sum+=i;
The numbers are -2, -1, 0, 1 and 2.
== The sum of any number and zero is that number.(2+0== 2) == the sum of any number and zero is that number. (2+0=2)
its 5035the summarian notation tells you that(sum of all #from 0 to a number'N'(sum of all #from 0 to N) = (n)+(n-1)+(n-2)+(n-3)+...+(2) +(1) or(sum of all #from 0 to N) = (1)+ (2) + (3) + (4)+...+(n-1)+(n)the two different sums are aligned by columns. now add the two colunms accordingly and you'll get2x(sum of all #from 0 to N)=(n+1)+(n+1)+...+(n+1) (n+1)is added n timesso2x(sum of all #from 0 to N) =n(n+1)(sum of all #from 0 to N) =n(n+1)/2so (sum of 5 to 100) = (sum of 0 to 100)- (sum of 0 to 5)=100(101)/2 - 5(6)/2 = 5050 - 15 = 5035