排序算法测试主程序

排序算法测试主程序


#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

posted on 2005-03-22 16:47  马维峰  阅读(1207)  评论(0编辑  收藏  举报