#include #include #include using namespace std; double f(double x){ return cos(x)-x; } int main(int argc, char** argv) { int i; double xL,xR,xM; double Error,Tol; cout<<"Enter xL:"<>xL; cout<<"Enter xR:"<>xR; cout<<"Enter Tol:"<>Tol; //Check that root is in the interval if(f(xL)*f(xR)>0.0){ cout<<"Root not in the given interval!"<0.0){ xL=xM; } else{ xR=xM; } Error=fabs((xR-xL)/xM); i++; }while(Error>Tol); cout<<"Root found at: "<