online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <math.h> using namespace std; int main() { float a, b, c, d, x, x1, x2, re, im; cout<<"a=?";cin>>a; cout<<"b=?";cin>>b; cout<<"c=?";cin>>c; if(a==0) if(b==0) if(c==0) cout<<endl<<"Aceasta nici macar nu e o ecuatie!"<<endl; else cout<<endl<<"Imposibil!"<<endl; else { cout<<endl<<"Este, de fapt, o ecuatie de gradul I"<<endl; x=-c/b; cout<<"Radacina este x="<<x<<endl;; } else { cout<<endl<<"Asta da! Este o ecuatie de gradul II"<<endl; d=b*b-4*a*c; if(d>0) { cout<<"Radacini reale distincte"<<endl; x1=(-b-sqrt(d))/2/a; x2=(-b+sqrt(d))/2/a; cout<<"x1="<<x1<<endl; cout<<"x2="<<x2<<endl; } else if(d==0) { cout<<"Radacini reale confundate"<<endl; x=-b/2/a; cout<<"x1=x2="<<x<<endl; } else { cout<<"Radacini complexe"<<endl; re=-b/2/a; im=-sqrt(-d)/2/a; if(im<0)im=-im; cout<<"x1="<<re<<" - "<<im<<"*i"<<endl; cout<<"x2="<<re<<" + "<<im<<"*i"<<endl; } } 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