Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include<iostream>
- #include<conio.h>
- #include <string>
- using namespace std;
- int i = 2, n;
- double x;
- int *polArray = new int[n + 1];
- void cpocob1() {
- polArray[0] = 0;
- polArray[1] = 2 * x;
- for (i = 2; i<(n); i++)
- {
- polArray[i] = 2 * x*polArray[i - 1] - 2 * (i - 1)*polArray[i - 2];
- }
- }
- int main()
- {
- setlocale(LC_ALL, "Russian");
- double n; double x;
- cout << "введи n" << endl;
- cin >> n;
- cout << "введи x" << endl;
- cin >> x;
- cpocob1();
- cout << "интеративный полином=" << polArray[i] << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement