摘要: View Code #include"stdafx.h"#include<iostream>#include<ctime>usingnamespacestd;int_tmain(intargc,_TCHAR*argv[]){inta[20];srand((unsigned)time(0));//新版本的是64位,srand是32为for(inti=0;i<20;i++){a[i]=rand()%100+1;}//选择法排序(循环n-1次)思路:每一次找出适合的元素放在正确的位置上/*for(inti=0;i<19;i++){for(int 阅读全文
posted @ 2012-03-11 22:45 lance2008 阅读(288) 评论(0) 推荐(0) 编辑