online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Curve Tracing - Hyperbola *******************************************************************************/ #include <stdio.h> #include <graphics.h> #include <math.h> void main() { int r; int gd = DETECT ,gm; initgraph(&gd, &gm, "C:\\TC\\BGI"); // Initialize variables int x, y; float pi = 3.14159265358979323846; // Draw the x-axis line(0, getmaxy() / 2, getmaxx(), getmaxy() / 2); // Draw the sine wave for (x = 0; x <= getmaxx(); x++) { // Calculate the y-coordinate of the sine wave y = getmaxy() / 2 - 50 * sin(x * pi / 180); // Plot the point putpixel(x, y, WHITE); } }

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