📄 56.c
字号:
#define M 1000#include <stdio.h>#include <math.h>void main(void){ double x,d,eps; int m=0; printf("input x eps\n"); scanf("%lf %lf",&x,&eps); do{ d=(((2*x+4)*x-5)*x-8)/((6*x+8)*x-5); /*d=(2*x*x*x+4*x*x-5*x+8)/(6*x*x+8*x-5)*/ x=x-d; m++; if(fabs(x)>1) d=d/x; }while((fabs(d)>eps)&&(m<M)); if(m<M) printf("x=%.12lf\n",x); else printf("calculation times is over than %d",M);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -