#include <stdio.h>
#include <stdlib.h>
#define LED sizeof(struct student)
struct student
{
int num1;
int num2;
struct student *next;
};
void main ()
{
int n,i;
struct student *head;
struct student *p,*p1,*p2;
p1=p2=(struct student *)malloc(LED);
scanf ("%d%d",&(*p1).num1,&p1->num2);
head=NULL;
n=0;
while (p1->num1!=0)
{
n++;
if (n1)
head=p1;
else
p2->next=p1;
p2=p1;
p1=(struct student *)malloc(NULL);
scanf ("%d%d",&(*p1).num1,&p1->num2);
}
p=head;
for (i=1;p->num1!=0;)
{
if(p->num2!=3)
{
p->num2=i;
p=p->next;
i++;
if (i. 4)
I =. 1;
}
the else
{
P = p-> Next;
}
}
P = head;
// output number 3 is not
while (p->num1!=0)
{
if (p->num2!=3)
printf ("编号%d 报数%d\n",p->num1,p->num2);
p=p->next;
}
system ("pause");
}
This program made me a headache problem list
after running
is the case
bigwigs can help us to see what's the problem it
hard to think of a couple of days at home