#include<iostream>
using namespace std;
#define MaxLen 100
typedef int ElemType;
typedef struct{
ElemType data[MaxLen];
int length;
}sqList;
sqList L;
//线性表的定义
int Getlen(sqList *L)
{return L->length;}
//求线性表长度的实现
ElemType Getelem(sqList *L,int i)
{
if(i<1 || i>L->length)
{
cout<<"error!";
exit(1);
}
return L->data[i-1];
} //按符号取元素的实现
int Locate(sqList *L,ElemType x)
{
int i;
i=0;
while(i<L->length && L->data[i]!=x)
i++;
if(i<L->length)
return i;
else return 0;
}//查找运算的实现
void Delelem(sqList *L,int i)
{
if(i<1 || i>L->length)
{
cout<<"不存在第i个元素";
exit(0);
}
int j;
for(j=i;j<=L->length-1;j++)
L->data[j-1]=L->data[j];
L->length--;
}// 删除运算的实现
void main()
{
sqList *P,*Q;
ElemType a[10],b[10];
cout<<"input 10 numbers:"<<endl;
for(int i=0;i<10;i++)
cin>>a[i];
cout<<endl;
cout<<"input another 10 numbers:"<<endl;
for(int j=0;j<10;j++)
cin>>b[i];
cout<<endl;
int n,k;
ElemType x;
for(n=1;n<=Getlen(Q);n++)
{x=Getelem(Q,n);
k=Locate(P,x);
if(k>0)
Delelem(P,k);
}
for(int m=0;m<10;m++)
cout<<a[m];
}