排序--冒泡排序

 

/*------------------------------------------------- 19-2.c  -------------------------------------------*/

#include "stdio.h"

void bubbleSort(int array[],int arraySize)
{
    int i,j,tmp ,flag = 1;
    for(i=0;i

 

程序运行结果:

Input ten integer
1 22 3 44 5 66 7 88 9 10

The result of bubble sorting for the array is
88 66 44 22 10 9 7 5 3 1

 

你可能感兴趣的:(#,S1:C/C++提高,ACM--排序)