#include <stdio.h>

#define EOD -1

void main(void)
{
    short num = 0,
          count = 0,
          sum = 0;

    for (count = 0; num != EOD; count++)
    {
        printf("Enter number (-1 to stop): ");
        scanf("%hd", &num);
        sum += num;
    }
}