关于C语言计算泰勒展开式的问题,详细要求如下

图片说明

图片说明

 #include <stdio.h>

int main(void) {
    while (true)
    {
        float x;
        scanf("%f", &x);
        float xs = 1;
        float ps = 1;
        float d = xs / ps;
        float r = d;
        int i = 1;
        while (d > 0.0001)
        {
            xs *= x;
            ps *= i++;
            d = xs / ps;
            r += d;
        }
        printf("%.2f\n", r);
    }
    return 0;
}

https://ideone.com/Y8H6Xx

https://download.csdn.net/download/caozhy/10766667

如果问题得到解决请点我回答左上角的采纳,谢谢