online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <cstdlib> #include <time.h> #define n 5 using namespace std; int laSuma(int v); int A[n]; int main() { srand(time(NULL)); int i; // ASIGNAMOS VALORES ALEATORIOS AL ARREGLO for(i=0; i<n; i++){ A[i] = rand(); } // IMPRIMIMOS LOS VALORES DEL ARREGLO for(i=0; i<n; i++){ cout<<A[i]<<" "; } cout<<endl<<"La media: "<<(laSuma(n))/n<<endl; return 0; } int laSuma(int v){ int res=0; if(v>=0){ res = A[v]+laSuma(v-1); } return res; }

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