#include "stdio.h"
struct student
{
long num;
float score;
struct student * next;
};
void main()
{
struct student stu1,stu2,stu3;
struct studentn * head,*p;
stu1.num=001;stu1.score=56;
stu1.num=002;stu1.score=77;
stu1.num=003;stu1.score=99;
head=&stu1;
stu1.next=&stu2;
stu2.next=&stu3;
stu3.next=NULL;
p=head;
while(p!=NULL)
{
printf("%ld,%5.1f\n",p->num,p->score);
p=p->next;
}
}
岂可奈何
相关分类