include stdafx include math include iostream using namespace std doubl

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "stdafx.h"
#include "math.h"
#include <iostream>
using namespace std;
double sin_our (double x, double eps)
{
double func=x;
double a = x;
double q=100.0;
int i=3;
int m=1;
while( abs(func-q) >= eps)
{ q=func;
m++;
i=++;
a*=x*x;
func+=pow(-1,m-1)*a/fact;
}
return func;
}
void main()
{
double x, eps;
cin>>x;
cin>>eps;
if ((x>=-1) && (x<=1)) cout<<arctg(x)<<'\t'<<sin_our(x,eps);
else cout<<"otstan Guzhov";
}