排序算法测试主程序

排序算法测试主程序


#include  < iostream >
#include 
< stdlib.h >

int  main()
{
  
int i, N = 100;
  
int *= new int[N];
  
for(i=0; i<N; i++)
  
{
    a[i] 
= 1000 * (1.0 * rand()/RAND_MAX);
    std::cout 
<< a[i] << " ";
  }


  std::cout 
<< std::endl << std::endl;

  Sort(a, 
0, N-1);

  
for(i=0; i<N; i++)
    std::cout 
<< a[i] << " ";

  std::cout 
<< std::endl; 
  std::cin 
>> i;

}


另有VB.net版本演示程序:http://www.cnblogs.com/maweifeng/archive/2005/03/22/123594.html

你可能感兴趣的:(排序算法)