#include <stdio.h>
#define students A
struct A
{
int num;
double score;
struct A *next;
};
int main()
{
struct A a,b,c,*head,*p;
a.num=10000;
a.score=80.2;
b.num=20000;
b.score=87.5;
c.num=30000;
c.score=98.5;
head=&a;
a.next=&b;
b.next=&c;
c.next=NULL;
p=head;
do{
printf("%d %.2lf\n",p->num,p->score);
p=p->next; //使链表一直往后
}
while (p!=NULL);
return 0;
}