#include<math.h>
#include<stdio.h>
#include<conio.h>
float f(float x);
#define e .000001
void main()
{
float x1,x2,x0,f0,f1;
clrscr();
scanf("%f%f",&x0,&x1);
f0=f(x0);
f1=f(x1);
if(f0*f1>0) printf("the guess values are wrong");
else {while(fabs(f(x2))  > e )
{	x2=(x0*f(x1)-x1*f(x0))/(f(x1)-f(x0));
	if(f(x2)<0)
		x0=x2;
	else  x1=x2;
}
printf("\n%f is the value\t",x2);
}
getch();
}
float f(float x)
{
return x*x*x-x-4;
}

