该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
#include
#include
#include "string.h"
#include
using namespace std;
struct student
{ int num;
char name[10];
char banji[10];
float score[3];
struct student *next;};
struct student *creat()
{struct student *head,*p1,*p2;
int i,n=0;char ch[20];
p1=(struct student*)malloc(sizeof(struct student));
cout<
getch();
gets(ch);p1->num=atoi(ch);getch();
cout<
gets(p1->name);getch();
cout<
gets(p1->banji);getch();
cout<
for(i=1;i<=3;i++)
cin>>p1->score[i];
head=NULL;
while(p1->num!=0)
{n+=1;
if(n==1)
head=p1;
else
p2->next=p1;
p2=p1;
p1=(struct student*)malloc(sizeof(struct student));
cout<
gets(ch);p1->num=atoi(ch);
cout<
gets(p1->name);
cout<
gets(p1->banji);
cout<