#include "stdafx.h"
#include <iostream>
#include "cmath"
using namespace std;
int main() {
double i, z;
float s, e, t;
cout << "e>0 e=";
cin >> e;
s = 0; i = 0; z = -1;
do
{
i++;
z *= 1;
t = z / i^2;
s += t;
}
while (abs(t)<e);
cout << s << endl;
system("pause");
return 0;
#include "stdafx.h"
#include <iostream>
#include "cmath"
using namespace std;
int main() {
double i, z;
float s, e, t;
cout << "e>0 e=";
cin >> e;
s = 0; i = 0; z = -1;
do
{
i++;
z *= 1;
t = z / i^2;
s += t;
}
while (abs(t)<e);
cout << s << endl;
system("pause");
return 0;
}