| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1787 人关注过本帖, 1 人收藏
标题: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
快速回复:119 十万火急 求救
数据加载中...
 
   



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

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