#include
#include
using namespace std;
int main()
{
double a, i, N, s = 0., x, y = 0.;
cout.precision(16);
while (true)
{
cout << "x N: ";
cin >> x >> N;
a = x;
s = y = 0.;
for (i = 1.; i <= N; i += 1.)
{
s += i;
a = atan(a);
y += a / s;
}
cout << y << endl;
}
}
#include
#include
#include
using namespace std;
int main()
{
double a, i, N, s, x, y;
cout.setf(ios::fixed);
cout.precision(4);
А потом всё тоже самое. И ещё сама нечётная функция у(х) интересна тем, что ряд, её определяющий, сходится при любых вещественных х. Вот её график: