struct Student * Delete(struct Student *p)
{
struct Student * p0, *p1;
int i;
printf("Please enter a integer to number for delete sequence.\n");
while (scanf("%d", &i) !=1 )
{
while (getchar()!='\n')
continue;
printf("Please enter a integer again!\n");
}
if (i == p->sequence)
{
p0 = p->next;
printf("Delete NO.%d!\n", i);
return p0;
}
p0 = p;
while (i != p->sequence && p->next != NULL)
{
p1 = p;
p = p->next;
}
if (p->sequence == i)
{
p1->next = p->next;
printf("Delete NO.%d!\n", i);
}
else
printf("You enter is error!Try again!\n");
return p0;
}