include stdio include stdlib int main void double S1 int printf Ââåäèò

 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
#include <stdio.h>
#include <stdlib.h>
int main(void) {
double x, S, S1, F=0, X;
int k=2;
printf("Ââåäèòå Õ:");
scanf("%lf", &x);
X=x*x;
S1=X/(k*k-1);
do{
S=S1;
F+=S;
k++; X*=x;
S1=X/(k*k-1);
}
while(fabs(S1-S)>0.00005);
printf("%lf", F);
return 0;
}