program rtbis_main real func, rtbis, x1, x2, xacc external func, rtbis write (*,*) 'What is the range x1 and x2 and accuracy ?' read (*,*) x1, x2, xacc write (*,*) 'A root is at ', rtbis(func,x1,x2,xacc), & ' with accuracy ', xacc end function func(x) real func, x c func = x**3 func = 7*sin(x) + x end