How to write the function int SuperSum(int n); which finds the sum of Sum(1)+Sum(2)+...+Sum(n) (question #1). Use it to find the sum of (1)+(1+2)+...+(1+2+3+4+5+6+7+8+9+10)??

Printable View

- 12-20-2011unoNeed some insight with these sets
How to write the function int SuperSum(int n); which finds the sum of Sum(1)+Sum(2)+...+Sum(n) (question #1). Use it to find the sum of (1)+(1+2)+...+(1+2+3+4+5+6+7+8+9+10)??

- 12-20-2011uno
Write a function int Sum(int n); which will find the sum 1+2+3+...+n. Use it to find the sum of 1+2+...+100

How to write the function int SuperSum(int n); which finds the sum of Sum(1)+Sum(2)+...+Sum(n) (question #1). Use it to find the sum of (1)+(1+2)+...+(1+2+3+4+5+6+7+8+9+10)?? - 12-20-2011laserlight
My guess is that you are expected to use a loop.

- 12-20-2011iMalc
So basically you're calculating the number of presents in the 12 days of Christmas... ;)

- 12-20-2011whiteflags
Isn't it the same as sum(n = 0, n =12) n * (12 - n) (in my fail math notation)