online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; int main(){ float prodPI=1, i=1; int n; do{ cout << "introduzca numero terminos n>0 para aproximar PI: " << endl; cin >> n; }while(n<=0); // https://es.wikipedia.org/wiki/Producto_de_Wallis while(i<=n){ prodPI=prodPI*((2*i)*(2*i))/((2*i-1)*(2*i+1)); i=i+1; } cout <<"Valor aproximad de PI: " << 2*prodPI << endl; 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