用二分法和迭代法求e^x+10*x-2=0方程的解

主要运用循环whileweb #include<stdio.h> #include<math.h> double erfenfa() {double a=1,b=0,c; while(fabs(a-b)>=5e-4) {c=(a+b)/2.0; if((exp(c)+10*c-2)==0) return c; if((exp(a)+10*a-2)*(exp(c)+10*c-2)<0)
相关文章
相关标签/搜索