更新 'ex8_1.c'
This commit is contained in:
parent
a4ec368095
commit
0a03411446
5
ex8_1.c
5
ex8_1.c
@ -4,7 +4,7 @@
|
||||
#define MAX 100
|
||||
typedef int DataType;
|
||||
typedef struct list{
|
||||
int data[MAX];
|
||||
DataType data[MAX];
|
||||
int start;
|
||||
int length;
|
||||
}List;
|
||||
@ -13,7 +13,7 @@ typedef struct list{
|
||||
*/
|
||||
void DirectSort(List *L){
|
||||
int j;
|
||||
for(int i = 2; i<=L->length; i++){
|
||||
for(int i = 2; i <= L->length; i++){
|
||||
L->data[0] = L->data[i];
|
||||
j = i-1;
|
||||
while(L->data[0] < L->data[j]){
|
||||
@ -105,4 +105,3 @@ int main(){
|
||||
printf("感谢使用,再见\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user