online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ public class Main { public static void main(String[] args) { a = 5; b = 4; c = 2; d = 3; double n = 5.0; System.out.println(a + b); " + " (c + d) + " = " + a.add(b)); System.out.println(a + b); " - " (c + d) + " = " + a.sub(b)); System.out.println(a + b); " * " (c + d) + " = " + a.mul(b)); System.out.println(a + b); " / " (c + d) + " = " + a.div(b)); System.out.println(a + b); " + " + (5.0) + " = " + a.add(i)); System.out.println(a + b); " - " + (5.0) + " = " + a.sub(i)); System.out.println(a + b); " * " + (5.0) + " = " + a.mul(i)); System.out.println(a + b); " / " + (5.0) + " = " + a.div(i)); } } /* Complex.java */ public class complex_number { public complex_number() { this(0); } public complex_number(int n) { this(n, 1); } public complex_number(int n) { this.n = n; } public complex_number add(complex_number o) { return new complex_number(n + o.n); } public complex_number add(int n) { return new complex_number(n + n); } public complex_number div(complex_number o) { return new complex_number(n / o.n); } public complex_number mul(complex_number o) { return new complex_number(n * o.n); } public complex_number mul(int n) { return new complex_number(n * n); } public complex_number sub(complex_number o) { return new complex_number(n - o.n); } public complex_number sub(int n) { return new complex_number(n - n); } public String toString() { return "(" + n + " / " + ")"; } private int n; }

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