online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> double squareRoot(double); int main() { double num; printf("Enter number: \n"); scanf("%lf", &num); if(num < 0) { puts("Negative values not allowed"); return 1; } printf("Square root of %.2lf is %lf", num, squareRoot(num)); } double squareRoot(double num) { double sqroot = num / 2, temp = 0; while (sqroot != temp) { temp = sqroot; sqroot = (num / temp + temp) / 2; } return sqroot; }

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