#include <stdio.h>
#include <stdlib.h>
#define MAXSIZE 100
int L[MAXSIZE]; //顺序表L
void InPutList(int L[ ]); //根据输入数据构建顺序表L
int LocateElem(int L[ ], int e); //在顺序表L中查找元素e
int main()
{
InPutList(L);
int e;
int pos;
scanf("%d",&e);
pos = LocateElem(L,e);
printf("The position of %d in SequenceList L is %d\n",e,pos);
return 0;
}
void InPutList(int L[ ])
{
int e;
int i=0;
scanf("%d",&e);
while(e!=-1)
{
L[i++]=e;
scanf("%d",&e);
}
}
int LocateElem(int L[ ], int e)
{//请在下面给出本函数的完整代码,实现在L中查找e,查找成功返回其序号,否则返回0
}