Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <cmath> //для функциии asin
- using namespace std;
- void main();
- {
- count<<"writeln x, N and E\n";
- int n;
- double x, E;
- cin>>x>>N>>E;
- if (x<=1) && (x>=-1)
- { // проверка на вычисление арксинуса
- double sum, factor, arcsinx; //сумма n элементов последовательности х, множитель перед х, арсинус
- acrsinx=asin(x); //вычисление арксинуса х
- sum=x; factor=1;
- int degree=1; //степень
- for (int i=2, i<=n, i++)
- {
- double factorx=1;
- factor=degree/(degree+1);
- degree=degree+2;
- for (int j=1, j<=degree, j++)
- factorx=factorx*x;
- factorx=factorx/degree;
- sum=sum+factor*factorx;
- }
- cout<<"summa";
- cout<<sum;
- cout<<"arcsin\n"<<arcsinx;
- }
- else cout<<"Error";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement