标题:119 十万火急 求救
只看楼主
飞翔
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2004-6-3
得分:0 

# indude <malloc.h> # define NULL 0 # define LEN sizeof(struct student) struct student {long num; char name[10]; char sex[2]; int English; int Marth; int Lead; int Sum; float Ave; struct student *next; }

int n; struct student *creat(void) {struct student *head; struct student *p1,*p2; n=0; p1=p2=(struct student *)malloc(LEN); scanf("%ld,%s%s%d%d%d",&pi->num,&pi->name,&pi->sex,&pi->English,&pi->Marth,&pi->Lead,); head=NULL; while pi->num!=0) {n=n+1; if(n==1) head=p1; else p2->next=p1; p2=p1; p1=(struct student *)malloc(LEN); scanf("%ld,%s%s%d%d%d",&pi->num,&pi->name,&pi->sex,&pi->English,&pi->Marth,&pi->Lead,); } p2->next=NULL; return(head); }

后面我不知道怎么写了,可以告诉我啊

2004-06-13 13:13
飞翔
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2004-6-3
得分:0 

hu_sir

在吗??

给我个提议啊!!

2004-06-15 14:17
飞翔
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2004-6-3
得分:0 

晕了吧

重要的是排序,竟然没有人做了

哎!

我烂啊

2004-06-23 17:08



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-2009-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.276390 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved