online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
# include <iostream> # include <math.h> void eingabe(double* a, double* b, double* c); void ausgabe(double* a, double* b, double* c, double* D); using namespace std ; int main(void) { double a = 0; double b = 0; double c = 0; double D = 0; // a * x * x + b * x + c = 0 eingabe(&a, &b, &c); D = b *b -4* a * c ; ausgabe(&a, &b, &c, &D); } void eingabe(double* a, double* b, double* c){ cout << "\nKoeffizienten a x^2 + b x + c : "; cin >> *a >> *b >> *c ; } void ausgabe(double* a, double* b, double* c, double* D){ if ( *D ==0) { cout << " x = " << -(*b) /(2* (*a) ) << endl; } if (*D >0) { cout << " x = " << ( - (*b) + sqrt(*D))/(2* (*a) ) << " und x = " << ( -(*b) - sqrt(*D))/(2* (*a) ) << endl; } if (*D <0) { cout << " x = " << -(*b) /(2* (*a) ) << "+ -" << sqrt( - (*D) )/(2* (*a) ) << "* i " << endl; } }

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
ExpressionValue