int a[] = {}; // 숫자를 넣어놈

int n; // 갯수

for(int i=1 ; i<=n ; i++)

{

if(a[i]>a[i+1])

{

swap(i,i+1);

i = 0

}

}