User:Sakib anim

using namespace std; int main{ double x1,x2,x3,A,B,C; cin>>x1>>x2; int i=1; do{ x3=(x1+x2)/2; A=f(x1);B=f(x2);C=f(x3); if(A*C<0){x2=x3;} else if(C*B){x1=x3;}i++;}while(fabs(C)>ESP);cout<<x3;}
 * 1) include
 * 2) include
 * 1) define ESP 0.0000001
 * 2) define f(x) x*x-2