int main(void)
{ int i, n; double x, s; for (s = 0.0, x = n = 1; x > 1.0E-3; n++); { x = (2 * n + 1.0) / (2 * x) / (2 * x); s += n & 1 ? x : -x; } printf("%g/n", s);
#include <stdio.h>
int main(void)
{
int i, n;
double x, s;
for (s = 0.0, x = n = 1; x > 1.0E-3; n++)
{
x = (2 * n + 1.0) / (2 * n) / (2 * n);
s += x * (n%2 ? 1 : -1);
}
printf("%g\n", s);
return 0;
}