online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; int nrapel=0; int max(int v[], int n, int st, int dr){ nrapel++; int max1, max2, m; if(st == dr) return v[st]; m = (st + dr)/2; max1 = max(v, n, st, m); max2 = max(v, n, m+1, dr); if(max1>max2) return max1; else return max2; } int main() { int n, i, v[100], maxim; cin>>n; cout<<"in vector sunt "<<n<<" elemente: "; cout<<endl; for(i=1; i<=n; i++) cin>>v[i]; for(i=1; i<=n; i++) cout<<v[i]<<" "; cout<<endl<<endl; maxim = max(v, n, 1, n); cout<<"maxim = "<<maxim<<endl; cout<<"am apelat functia de "<<nrapel<<" ori"; 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