You may think that there is a unique solution to that problem, but that is not the case. Any positive number can be added to the negative version of itself to obtain a sum of zero (-589 added to 589 is zero, etc.) The simplest case, of course, is to add zero to zero, getting a total of zero.
60
The numbers are -2, -1, 0, 1 and 2.
The numbers are -2, -1, 0, 1 and 2.
var sum = 0; for (var i = 0; i < 20; i++) { sum = sum + i * 2; }
The sum of all even numbers between 0 and 398 (2-396) is 157,212. If you include 398 the sum is 158,802.
i need 2 numbers whose sum is 832AnswerThe numbers are n and (832 - n) where n is any number from 0 to 416.
2,4
:−3+0+1+2 = 0 :−3*0*1*2 = 0
"Natural Numbers" can mean either "Counting Numbers" {1, 2, 3, ...}, or "Whole Numbers" {0, 1, 2, 3, ...}, depending on the subject.So either 0 + 0 = 0 or 1 + 1 = 2
sum = 0 for(n = 0; n <= 10; n += 2) sum += n;
int i, sum = 0; for (i=0; i<20; i+=2) sum+=i;
The numbers are -1, 0, 1, 2 and 3.