int n; cin >> n; double x = 0; double s; s = 1.0 / (1 + n * n); n++; x = x + s; while (s > 0.01) { s = 1.0 / (1 + n * n); n++; x = x + s; }