//bubble sort in C
//a is an array and q is its length
for(int i = 0; i<q; i++){
for(int j = 0; j<q-1; j++){
if(a[j]>a[j+1]){
a[j] ^= a[j+1];
a[j+1] ^= a[j];
a[j] ^= a[j+1];
}
}
}
int count; int aux; int array[count];
for (int i = 0; i < count; i++)
{
for (int j = 0; j < count - 1; j++)
{
if (array[j] > array[j + 1])
{
aux = array[j];
array[j] = array[j+1];
array[j+1] = aux;
}
}
}