#include<stdio.h>
#include <stdlib.h>
#define MaxSize 50
typedef struct {
int data[MaxSize];
int length;
}SqList;
void main(){
SqList La={{2,4,31,42,51,69,77,84,96,99},10};
Delst(&La,5,44);
ShowList(&La);
system("pause");
}
int ShowList(SqList *L) //显示顺序表
{
int i;
for(i=1;i<L->length;i++)
printf("%d ",L->data[i]);
printf("\n");
return 0;
}
int Delst(SqList *L,int s,int t){
int i=0;
int Fastu;
int Lastu;
*** //while (L->data[i]>=s){
**** while (i>=5){
*** //Fastu=i;
*** i++;
*** }
int j=0;
for(j=4;j<L->length;j++){
L->data[j]=L->data[j+(5)];
}
L->length=L->length-(5);
return 0;
}
/*
2 4 31 42 51 69 77 84 96 99
2 4 51 69 77 84 96 99
请按任意键继续. . .
*/
#include <stdio.h>