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#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ import static java.lang.Math.*; class Punto2DTest { public static void main(String[] args) { Punto2D puntoA = new Punto2D(1.0 , 1.0); Punto2D puntoB = new Punto2D(2.0 , 2.0); int grados = 45; System.out.println("PuntoA: " + puntoA); System.out.println("PuntoB: " + puntoB); System.out.println("Número de Puntos: " + Punto2D.getNumeroDePuntos()); System.out.println("Módulo del puntoA " + puntoA + ": " + puntoA.getModulo()); System.out.println("Angulo en Grados de Coordenadas Polares del puntoA " + puntoA + ": "+ puntoA.getTeta()); System.out.println("Distancia del puntoA " + puntoA + " al puntoB " + puntoB + ": " + puntoA.getDistancia(puntoB)); System.out.print("Resultado de rotar el puntoA " + puntoA + " alrededor del puntoB " + puntoB + " un ángulo de " + grados + " grados: "); puntoA.rotar(puntoB, grados); System.out.println(puntoA); } } class Punto2D { private double x; private double y private static int numeroDePuntos = 0; public Punto2D() { this(0.0, 0.0); } public Punto2D(double x, double y) { this.x = x; this.y = y; numeroDePuntos++; } public double getX() { return x; } public double getY() { return y; } public static Integer getNumeroDePuntos() { return numeroDePuntos; } public double getModulo() { // módulo del vector formado por el punto return sqrt(pow(x, 2) + pow(y, 2)); } public double getTeta() { // ángulo en radianes del vector formado por el punto double angrad = atan2(y, x); return toDegrees(angrad); } public double getDistancia(Punto2D p) { return sqrt(pow(x - p.x, 2) + pow(y - p.y, 2)); } public void trasladar(double a, double b) { x += a; y += b; } public void escala(double factor) { x *= factor; y *= factor; } public void rotar(Punto2D p, double angulo) { // angulo en grados double angrad = toRadians(angulo); // angulo en radianes double x1 = x - p.x; double y1 = y - p.y; double x2 = x1 * cos(angrad) - y1 * sin(angrad); double y2 = x1 * sin(angrad) + y1 * cos(angrad); x = x2 + p.x; y = y2 + p.y; } public String toString(){ return "(" + x + ", " + y + ")"; } }

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