标签:span tmp += double col math oat problem div
#include<stdio.h> #include<math.h> int main() { float x,i; scanf("%f",&x); double tmp=x,y=x; i=2; while(tmp>=0.00001) { tmp=pow(x,i); for(int k=1;k<=i;k++) tmp=tmp/k; y+=tmp; i++; } printf("%.3f",y); return 0; }
Problem Q: 多项式求和x+(x^2)/2!+(x^3)/3!+...
标签:span tmp += double col math oat problem div
原文地址:https://www.cnblogs.com/chenlong991223/p/9865000.html