The answer is 1830.
Sum = 79*(79+1)/2 = 79*80/2 = 3160
The sum of the numbers given is 31. 1 + 2 + 4 + 8 + ... + 2n = 2n+1 - 1
The sum is 96.
The sum of -1 and -1 is -2.
1 and 2.
If the question means solve 1+2+...+60 then 1+2+...+n = n(n+1)/2 for any integer n>0 So for n= 60 the sum is 60*61/2 = 30*61 = 1830
if (n%2==0) sum=n/2*(n+1); else sum=(n+1)/2*n;
Sum = 79*(79+1)/2 = 79*80/2 = 3160
2
2
The sum of the numbers given is 31. 1 + 2 + 4 + 8 + ... + 2n = 2n+1 - 1
1+2+4 = 7
The sum is 96.
You add 1 plus another one and you get 2
The sum of -1 and -1 is -2.
3
1 and 2.