//SDUT 1138 数据结构上机测试2-1:单链表操作A
#include <stdio.h>
#include <stdlib.h>
struct Node
{
int data;
struct Node *next;
};
void Show (struct Node *x);
struct Node *Creat(int n);
struct Node *Delete(struct Node *x,int n);
int main ()
{
int n;
struct Node *head,*heads;
scanf ("%d",&n);
head=Creat(n);
scanf ("%d",&n);
heads=Delete(head,n);
Show (head);
printf ("\n");
Show(heads);
return 0;
}
struct Node *Creat(int n)
{
struct Node *head,p,q;
int i=0;
head=(struct Node)malloc (sizeof (struct Node));
if (head==NULL)
exit(0);
head->next=NULL;
head->data =n;
p=head;
q=head;
for (i=0;i<n;i++)
{
p=(struct Node)malloc (sizeof(