1. ## Printing Partial Sums

Trying to print something like this:

1 sum = 1

1 2 sum = 3

etc...all the way too

1 2 3 4 5 6 7 8 9 10 sum = 55

I dont know how to make it add up the numbers.

Code:
```#include <stdio.h>

int main (void)
{
int a, b,
sum = 0;

for(a = 1; a <= 10; a++)
for(b = 1; b <= 10; b++)

if(b == a)
{
printf("%d\n", b);
break;
}
else
printf("%d", b);

}```
White now I am getting is just.

1
12
123
etc...

I know there should be a sum somewhere just dont know where.

2. is this just the summation ("Sigma") from 1 to 10? if so then can you just use the mathematical equation to do this without looping? google something like summation identities, to find what it is.

EDIT: if you cant do it this easier and more efficient way, i.e. youre required to use looping for an assignment or something, then theres no way around that (obviously). if this is the case, then youre outer loop is correct but your inner loop is not. hopefully the following pseudocode helps:
Code:
```for outer loop a=1
inner loop b does 1 = 1

for outer loop a=2
inner loop b does 1 + 2 = 3

for outer loop a=3
inner loop b does 1 + 2 + 3 = 5

...

for outer loop a=10
inner loop b does 1 + 2 + ... + 10 = 55```
hopefully you see the pattern and understand it.