11-7.cpp
来自「C程序设计(第3版)程序源代码,提供你最丰富的实际代码」· C++ 代码 · 共 23 行
CPP
23 行
#include <stdio.h>
#define NULL 0
struct student
{long num;
float score;
struct student *next;
};
main()
{ struct student a,b,c,*head,*p;
a. num=99101; a.score=89.5;
b. num=99103; b.score=90;
c. num=99107; c.score=85;
head=&a;
a.next=&b;
b.next=&c;
c.next=NULL;
p=head;
do
{printf("%ld %5.1f\n",p->num,p->score);
p=p->next;
} while(p!=NULL);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?