online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <stack> using namespace std; int main(){ int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++){ cin >> arr[i]; } stack<int> s; for (int i = 0; i < n - 1; i++){ for (int j = i + 1; j < n; j++){ if (arr[j] > arr[i]){ cout << arr[j] << " "; break; } cout << "-1" << " "; break; } } cout << "-1" << " "; }

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