You need to be working with floats on the right-hand side to get floating-point division. Right now you are doing integer divisions.
s -= 1.0/(i*i);
This one gets everyone at least once a year. Hope this helps.
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229