#include <cmath>
#include <iomanip>
#include <iostream>
using namespace std;
int main()
{
    int k; long double sum2,x,e,y=0,sum;
    cout << "Введите точность вычисления:" << endl;
    cin >> e;
    for (x=0.1; x<0.9;x+=0.1)
    {k=0;sum=0;
        while(1) {
            sum2=sum;
            y = (pow(-1, k) * pow(x, 2 * k + 1)) / (2 * k + 1);
            cout << "k = " << k << ",  y = "<< y <<endl;
            sum += y;
            if(fabs(sum-sum2)<=e){
                break;}
            k++;
        }
    cout << endl << "atan("<<setprecision(1) << x <<")="<<setprecision(10)<<sum;
    }
    return 0;
}
