include stdio include stdlib define EPS 1e-5 int main int argc char ar

 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>
#define EPS 1e-5
int main(int argc, char *argv[])
{
unsigned int k=1;
double x,a,s;
printf("vvedite x=");
scanf("x=",&x);
a=(x-1)/1;
s=a;
while( a>EPS || a<-EPS)
{
k++;
a*=(x-k)/(k*(x-k+1));
s+=a;
}
printf("%lf\n", s);
system("PAUSE");
return 0;
}