online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
Program NewtonRaphsonIter(output); function newton_raphson_iter(a: real; p: real; eps: real; max_i: integer) : real; var x: real; i: integer; begin x := a / 2.0; i := 0; repeat x := (x + a / x) / 2.0; i := i + 1; if (x * x = a) then break; if (i >= max_i) then break; until abs(x - a / x) <= eps; newton_raphson_iter := x; end; var sqroot: real; begin sqroot := newton_raphson_iter(9, 0.001, 0.0000001, 10); writeln(sqroot); end.

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