宁波OJ平台,1123 求cos(x)的值,

#include<stdio.h>
#include<math.h>

double jiecheng(int n);

int main()
{
    double x,y;

    scanf("%lf",&x);
    y=1.0-pow(x,2)/jiecheng(2)+pow(x,4)/jiecheng(4)-pow(x,6)/jiecheng(6)+pow(x,8)/jiecheng(8);
    printf("%.2lf\n",y);
    return 0;
}

double jiecheng(int n)
{
    double y=1;
    int i;

    for(i=n;n>0;n--)
        y *= n;
    return y;
}

请问你具体碰到了什么问题?