バブルソート関数(ヒント1)

void
bubble_sort(int a[],int n){
	int i,j;
	
	for(i=0;i<n-1;i++){
		for(j=n-1;j>i;j--){

a[j-1]がa[j]よりも大きければa[j]とa[j-1]を交換

} } }
Top