online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include<iostream> #include<math.h> using namespace std; float func(float x) //User Define Funtion { float m= x*x*x-x-11; return m; } int main() { float a, b,c; a = 2; b = 3; cout<<"Funtion is X^3-X-11"<<endl; cout <<"initialization by two numbers "<<endl; cout<<"First initialization number = 2"<<endl; cout<<"secound initialization number = 3"<<endl; if( func(a)*func(b)>=0 ) { cout<<"Roots are not present between initialization"<<endl; return 0; } for(int i=1;i<10;i++) { c= (a+b)/2.0; if (func(c)*func(b)<0) { a=c; } else { b=c; } if(func(c)==0) {break;} } cout<<"\nApprox root of this function between 2 and 3 by using bisected method is "<<c; return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue