online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> void bubbleSort(int A[], int N){ for(int i=0; i<(N-1);i++){ for(int j=i+1;j<N;j++){ if(A[j]>A[i]){ int h=A[i]; A[i]=A[j]; A[j]=h; } } }} void alternate(int A[],int N){ int i=0; int j=N-1; while(i<j){ printf("%d %d ",A[i],A[j]); i++; j--; } if(i == j){ printf("%d ",A[i]); } } int main() { int N; scanf("%d",&N); int A[N]; for(int i=0;i<N;i++) scanf("%d",&A[i]); bubbleSort(A,N); alternate(A,N); 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