JD *creat(JD *front) {JD *q; int s,p; front->link=NULL; rear=front; printf("\n输入队列元素"); scanf("%d",&p); if(p>0) {printf("\n输入第%d个队列元素",p); while(p>0) {scanf("%d",&s); q=(JD*)malloc(sizeof(JD)); q->data=s; q->link=NULL; rear->link=q; rear=q; p--;} } return(front); }