online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <ctime> #include <string> #include <cstdlib> using namespace std; int main() { setlocale(LC_ALL, ".1251"); srand(time(0)); int n; cout << "Введите размерность массива: "; cin >> n; cout << endl; int arr[n]; for (int i = 0; i < n; i++) { arr[i] = rand() % 20; cout << arr[i] << " "; } int a, b; cout << endl << "Введите интервал который необходимо удалить: "; cin >> a >> b; int j = 0; for (int i = 0; i < n; i++) { int x = abs(arr[i]); if (x < a || x > b) { arr[j++] = arr[i]; } } while (j < n) arr[j++] = 0; cout << endl << "Сжатый массив" << endl; for (int i = 0; i < n; i++) { cout << arr[i] << " "; } }

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