I'm trying to figure out a homework assignment in C. The instructions state to have the user input integers in a loop until they enter a negative number, and then to output the sum of all the numbers. The second part seems pretty straight forward to me, but I can't wrap my head around the first part. How do you store a user input integer with a loop?

This is all I have so far.

```
int main(void)
{
      int i = -1;
      while(i > -1)
      {
          printf("Please enter a number %i. When finished, enter a negative number.", i);
          scanf("%i", &i);
      }
      return 0;
}

```