#include<stdio.h>
#include<stdlib.h>
#define LEN sizeof(struct stu)
struct stu
{
	int sno;
	char name[10];
	float score[3];
	struct stu *next; 
};
int main()
{
	int no;
	struct stu *head,*p;
	head=(struct stu *)malloc(LEN);
	head->next=NULL;
	printf("no:");
	scanf("%d",&no);
	while(no!=0)
	{
		p=(struct stu *)malloc(LEN);
		p->sno=no;
		getchar();
		printf("name:");
		gets(p->name);
		int j;
		for(j=0;j<3;j++)
		{
		   printf("score %d:",j+1);
		   scanf("%f",&p->score[j]);
		}
		p->next=head->next;
		head->next=p;
		printf("no:");
	    scanf("%d",&no);
	}
	printf("%-5s%-10s%-10s%-10s%-10s\n","学号","姓名","科1","科2","科3"); 
	for(p=head->next;p!=NULL;p=p->next)
	printf("%-5d%-10s%-10.2f%-10.2f%-10.2f\n",p->sno,p->name,p->score[0],p->score[1],p->score[2]);
}