online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <iomanip> #include <cmath> using namespace std; double discriminante (float x, float y, float z); int main(){ float a, b, c, disc, x1, x2; cout<<"ingrese valor de a"; cin>>a; if (a==0){ cout <<"no es posible"<<endl; }else{ cout<<"ingrese coef b"; cin >> b; cout<<"ignrese coef c"; cin >> c; disc = discriminante(a,b,c); if(disc<0){ cout<<"discriminante negavitdo"<<endl; } else{ x1 = (-b+sqrt(disc)) / (2*a); x2 = (-b-sqrt(disc)) / (2*a); cout<<"Las soluciones reales son: "<<endl; cout<<"x1="<<setprecision(3)<<x1<<endl; cout<<"x2="<<setprecision(3)<<x2<<endl; } } return 0; } double discriminante (float a, float b, float c){ double w; w = pow(b,2)-(a*c); return w; }

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