Wiki User
∙ 2012-07-07 18:20:5556
Wiki User
∙ 2012-07-07 18:20:551+0+3 is the digit sum of 103
-3
if (n%2==0) sum=n/2*(n+1); else sum=(n+1)/2*n;
Two factors of what? To sum to -2, some possibilities are: -1, -1 => what is 1 0, -2 => what is 0 1, -3 => what is -3 2, -4 => what is -8 3, -5 => what is -15 4, -6 => what is -24
You add the numbers in a loop. Here is an example in Java:int sum = 0;for (int i = 1; i
-1+1+2+3+5= 10 First, you move 1 left of "0", which is -1. Then, you move 1 digit to the right, which puts you back at "0". Add 2, add 3, and add 5. The sum is 10.
3
-1, 0, 1
The sum is 1511.
0
5050
87