Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include"math.h"
- using namespace std;
- int main()
- {
- #define pi 3,1415926
- setlocale(LC_CTYPE, "Rus");
- int n;
- double x;
- cout << "Введите x: ";
- cin >> x;
- cout << "Введите n: ";
- cin >> n;
- double fx = (pi / 2);
- for (int i = 1; i <= n; i++)
- {
- fx += pow(-1, i + 1) / ((2 * i + 1) * pow(x, 2 * i + 1));
- }
- cout << "actgx = " << atan(fx) << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement