include “stdio.h”
void quick_sort(int *a, int n){
for (int i = 0; i < n; i++)
for (int j = i + 1; j < n; j++){
if (a[i] > a[j])
{
int temp= a[i];
a[i] = a[j];
a[j] = temp;
}
}
}
int main(){
int a [] = { 1, 6, 5, 4, 5, 3, 2, 5, 4 };
quick_sort(a, 9);
int i;
for (i = 0; i < 9; i++){
printf(“%d\n”,a[i]);
}
system(“pause”);
return 0;
}