online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; int main() { int n=8; int a[n] = {6, 5, 3, 1, 8, 7, 2, 4}; int pasada, j, aux; //bucle externo controla la cantidad de pasdas for(pasada=0; pasada<n-1; pasada++){ for(j=0; j<n-1-pasada; j++){ if(a[j] > a[j+1]){ //elementos se intercambian aux=a[j]; a[j]=a[j+1]; a[j+1]=aux; } } } for(j=0; j<n; j++){ cout<<a[j]<<" "; } 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