#include <stdio.h>

void swap(int *a,int *b) {
    int k = *a;
    *a = *b;
    *b = k;
    
} 

int main() {
    int aK[] = {
    1,2,1,3,
    2,3,1,3,
    2,1,2,3,
    2,1,3,1,
    2,3,2,1};
    int p = 0;
    while (p < 18) {
        printf("%d,",aK[p]);
        p++;
    }
    printf("%d.\n",aK[19]);
    p = 0;
    while (p < 19) {
        if (aK[p] > aK[p+1]) {swap(&aK[p],&aK[p+1]);p=0;}
        p++;
    }
    p = 0;
    while (p < 18) {
        printf("%d,",aK[p]);
        p++;
    }
    printf("%d.\n",aK[19]);
    
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: