c file name : ex0202.f program nibunho parameter( imax = 20, epsilon = 1d-3 ) f(x) = x**3 - 1.0 write(*,*) 'Enter two values of nibunho' read(*,*) a, b do i=1, imax c = yac = f(a) * f(c) if( yac .lt. 0.0 ) then else endif ans = ( a + b )/2.0 ratio = abs( ( b - a) / ans ) write(*,*) i, yac, a, b, ans, ratio if( ) stop enddo end