正在加载图片...
x1=(cos(x0)-x0)/(sin(x0)+1) return xl 【题8.88】 double add( double x, double y) return x + y; 【题8.89】 float root( float x1, float x2) int 1 float x, y, y1 y1=f(x1); x= xpoint(x1, x2) y =f(x); f(y*y1>0) while (fabs(y)>=0 0001) return(x) 【题8.90】 float p(intn,intx) float t, t1, t2 f(n=0) return (x) else t1=(2*n-1)*x*p(n-1),x) eturn(t)float x1; x1 = (cos(x0) – x0) / (sin(x0) + 1); x1 = x1 + x0; return x1; } 【题 8.88】 double add(double x, double y) { return x + y; } 【题 8.89】 float root(float x1, float x2) { int i; float x, y, y1; y1 = f(x1); do { x = xpoint(x1, x2); y = f(x); if (y * y1 > 0) { y1 = y; x1 = x; } else x2 = x; } while (fabs(y) >= 0.0001); return(x); } 【题 8.90】 float p(int n, int x) { float t, t1, t2; if (n == 0) return(1); else if(n == 1) return(x); else { t1 = (2 * n – 1) * x * p((n–1), x); t2 = (n – 1) * p((n-2), x); t = (t1 – t2) / n; return(t); } }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有