I don't know what you mean by Bsort... Bubble sort ?
Bubble sort is one of the quickest way to arrange the numbers in ascending/descending orders...
here's a simple bubble sort program:
PHP Code:
#include <stdio.h>
main()
{
int a[10] = {1,2,3,4,5,6,7,8,9,10};
int i,c,j;
for (j=0; j<=8;j++){
for (i=0;i<=8; i++){
if (a[i]<a[i+1]){
c=a[i];
a[i]=a[i+1];
a[i+1]=c;
}
}
}
for (i=0; i<=9; i++){
printf("a[%d]=%d\n",i, a[i]);
}
}
If bubble sort is what you're looking for, you can change this program to fit your needs.