#include <stdio.h>
const int N=10;
int Liste[10]={5,3,2,8,12,1,32,-4,7,4};
void inversion(int n) {
int temp=Liste[n];
Liste[n] = Liste[n+1];
Liste[n+1] = temp;
}
int main() {
int n=-1;
while (n++!=N-2) {
if (Liste[n]>Liste[n+1]){
inversion(n);
n=-1;
}
}
for (n=0;n<10;n++)
printf(" %d -",Liste[n]);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: