online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
var arr = []; for(let i = 0;i < 100;i++){ arr.push(Math.round(Math.random()*1000)); } const l = arr.length; const factor = 1.7; let gap = l; let swaps = true; // пока шаг больше единицы и были обмены while ((gap > 1) || swaps) { gap = Math.max(1, Math.round(gap / factor)); swaps = false; for (let i = 0; i+gap < l; i++) { if (arr[i] > arr[i+gap]) { let t = arr[i+gap]; arr[i+gap] = arr[i]; arr[i] = t; swaps = true; } //print(arr); } } for(let i = 0;i < arr.length - 1;i++){ if(arr[i + 1] < arr[i]){ print('Массив неправильно отсортирован! ' + i + ' ' + arr[i] + ' ' +arr[i+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