#include <iostream>
#include <cmath>
using namespace std;
#define E 0.01
double f(double x)
{
   return x*x*x-x-11;
}
int a,b;
void first()
{
    
    here:
    cout<<"enter the value of initial guesses  - "<<endl;
    cin>>a>>b;
    
    if(f(a) * f(b) > 0)
    {
        cout<<"Incorrect guesses!"<<endl<<"Enter again"<<endl;
    }
    else
    {
    goto here;
    }
}

void table()
{
    cout<<"a/t/t/tb/t/t/tt/t/t/tf(t)"<<endl;
}

void second()
{
    double t = (a+b)/2;
   do
   {
        cout<<a<<b<<t<<f(t)<<endl;

        if(f(t) < 0)
        {
            a=t;
        }
        else
        {
            b=t;
        }
        
   }
   while(f(t) <= E);
        {
            cout<<"\n root will be - "<<t<<endl;
        }
}

int main() {
    
    void first();
    void table();
    void second();
    return 0;
}