online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> #include <stdlib.h> #include <math.h> int main() { double k,pi,numtermos; printf("Digite a quantidade de termos: \n"); scanf("%lf",&numtermos); pi=0; k=0; do { pi = pi + 2 * pow(-1,k) * pow(3,0.5-k) / (2 * k + 1); k=k+1; } while (k < numtermos); printf("Valor de pi:\n"); printf("%lf",pi); getchar(); return 0; }

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