You could store the numbers in a linked list, or an array (assuming you want to keep all the numbers).
Such as,
Code:
#define MAX_EQUATIONS 32
/* ... */
int num = 0,
i = 0,
z = 0,
product = 0,
m = 0;
int numbers[MAX_EQUATIONS] = {0};
/* ... */
for(m = 0; m < MAX_EQUATIONS; m++)
{
printf("Enter a number (0 to quit): ");
scanf("%d", &num);
if(num != 0)
{
numbers[i] = num;
++i;
}else{
break;
}
}
/* do equations with numbers from [0, i] */
for(z = 0; z < i; z++)
{
product *= numbers[z];
sum += numbers[z];
}
/* etc */
of course that's purely a demonstration.