- 1
- 0
- 约5.2千字
- 约 33页
- 2019-12-21 发布于广西
- 举报
#include stdio.h #include stdlib.h #include math.h #define TRUE 1 void main() { int it_limit, it; float a, b, c, epsilon, Y_a, Y_b, Y_c; float fun_f(); printf( Lower bound: a ? ); scanf( %f, a ); printf( Upper bound: c ? ); scanf( %f, c ); epsilon=1e-8; it_limit=100; it = 0; Y_a = fun_f( a ); Y_c = fun_f( c ); if( Y_a*Y_c 0 ) { printf( f(a)f(c) 0, break. \n ); exit(0); } else { while( TRUE ) { it = it + 1; b = (a + c)/2; Y_b = fun_f( b );
原创力文档

文档评论(0)