I'm not sure exactly what you want here, but something like this would get up to 100 numbers and store them in an array. If zero is entered then it would break the loop.
Code:
int n[100];
int i;
for(i=0; i<100; i++)
{
scanf("%i", &n[i]);
if(! n[i]) break;
}
[edit]Also if you are expecting your compiler to interpret you numbers in your equation as floats you might want to add a decimal point. IE:
pi*pi = 12.0*(1.0/(1.0*1.0) - 1.0/(2.0*2.0) + 1.0/(3.0*3.0) - 1.0/(4.0*4.0) + 1.0/(5.0*5.0)
Otherwise I think something like 1/(5*5) would come out as 0.