#include<conio.h>
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
double fun(double x, int n)
{
int i;
double s=1.0,k=1.0;
for(i=1;i<=n;i++)
{
k=k*i;
s=s+(x,i)/k;
}
return s;
}
void main()
{
FILE wf;
system(“CLS”);
printf("%f ",fun(0.3,10));
//
wf=fopen(“out.dat”,“w”);
fprintf(wf,“%f”,fun(0.3,10));
fclose(wf);
//
}