欢迎采纳
#include
#include
double caculation(double x,int n)
{
int i;
double z,m,s,r;
m=1;
s=1;
for(i=1;i<=n;i++)
{
z=pow(x,i);
m=m*i;
r=z/m;
s=s+r;
}
return(s);
}
main()
{
int n;
double x;
scanf("%d,%lf",&n,&x);
printf("函数值为:%f\n",caculation(x,n));
}