#include <stdio.h>
#include <stdlib.h>
struct node{
int date;
struct node *next;
};
struct node *table(int n)
{
int i,a;
struct node *head,*p1,*p2;
head=NULL;
for(i=n;i>0;i--)
{
p1=(struct node*)malloc(sizeof (struct node));
scanf("%d",&a);
p1->date=a;
if(head==NULL)
{
head=p1;
p2=p1;
}
else
{
p2->next=p1;
p2=p1;
}
}
p2->next=NULL;
return head;
}
void mydelete(struct node *q,int index)
{
int j=1;
struct node *s;
//q=head;
while(q&&j<index-1
#include <stdlib.h>
struct node{
int date;
struct node *next;
};
struct node *table(int n)
{
int i,a;
struct node *head,*p1,*p2;
head=NULL;
for(i=n;i>0;i--)
{
p1=(struct node*)malloc(sizeof (struct node));
scanf("%d",&a);
p1->date=a;
if(head==NULL)
{
head=p1;
p2=p1;
}
else
{
p2->next=p1;
p2=p1;
}
}
p2->next=NULL;
return head;
}
void mydelete(struct node *q,int index)
{
int j=1;
struct node *s;
//q=head;
while(q&&j<index-1