题目要求:
源代码:
#include <stdio.h>
#include <stdlib.h>
typedef struct _SeqList
{
int *elem;
int length;
int listsize;
} SeqList, *pSeqList;
int InitList(pSeqList L, int listsize);
int InsertList(pSeqList L, int x, int position);
int FindList(pSeqList L, int pos, int *value);
int Destroy(pSeqList);
void output(SeqList L);
int prime(int n);
int main(void)
{
int i, n, pos, value;
SeqList L;
printf("输入初始化线性顺序表的长度:"); //即该顺序表可放的元素个数
scanf("%d", &L.listsize);
if (InitList(&L, L.listsize) <= 0