摘要: #include #include typedef struct node { int name[5]; struct node *next; } student;struct node* creatList(int n){ int i=0; student *head,*p; head=(student*)malloc(sizeof(student)); head->next=NULL; printf("请输入%d个数据,来创建链表\n",n); for(;iname)); p->next=head->next; head->next=p; } r 阅读全文
posted @ 2013-08-09 19:28 shouqiang Wei 阅读(198) 评论(0) 推荐(0) 编辑
摘要: #include #define MAX 100void dispaly(int a[],int n){ for(int i=0;ia[j+1]) { int temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } dispaly(a,n); }}//insert sort 插入排序void insertSort(int a[],int n){ for(int i=1;i0 &&a[j]a[j+1]) { min=a[j+1]; index=j+1; } } int temp=a[i]; a[i]=min; a... 阅读全文
posted @ 2013-08-09 15:58 shouqiang Wei 阅读(289) 评论(0) 推荐(0) 编辑