帮忙看看那点出错,谢谢!
#include"stdio.h"int j(int n)
{int i,k=1;
for(i=1;i<=n;i++)
k*=i;
return k;
}
float G(float x,int n)
{int a;float s=1;
for(a=1;a<=n;a++)
s*=x;
return s;
}
float f(float x,int n)
{float z,m=1,i;int a=1;
for(i=1;i<=10;i++)
{z=(float)G(x,2*a)/j(2*i);
a++;
z=-z;
m+=z;
}
return m;
}
void main()
{int n=7;
float x=5.6,y=0,s1=0,s2=0,s3=0;
s1=f(x,n);
s2=f(x+2.3,n);
s3=f(x-3.2,n+3);
y=s1/(s2+s3);
printf("%d",y);
getch();
}要求已知Y=f(x,n)/(f(x+2.3,n)+f(x-3.2,n+3)),其中f(x,n)=1-(x的2次方)/(2阶乘)+(x的4次方)/(4的阶乘)-....+(-1)的n次方*(x的2n次方)/(2n的阶乘)(n>=0)当x=5.6,n=7时求y. 帮忙看看那点出错,谢谢!