考试报名管理(数据结构).docxVIP

  • 225
  • 0
  • 约3.77千字
  • 约 7页
  • 2023-07-30 发布于江西
  • 举报
考试报名管理(数据结构)源代码 #includestdio.h #includestdlib.h #includemalloc.h #includestring.h #define ID struct id struct id { char name[20]; int num; int age; char sex[2]; char kind[20]; ID *next; }; int sum_age=0,max_age=0,min_age=100,pc=0; float ave_age=0; ID *creat() { ID *p1,*p2,*head; int pd; p1=p2=head=NULL; printf(\t\t\t 开始输入记录\n); printf(please input pd:\n); scanf(%d,pd); while(pd!=0) { p1=(ID*)malloc(sizeof(ID)); printf(请输入学生的准考证号:\n);scanf(%d,p1-num); printf(请输入学生的姓名:\n);scanf(%s,p1-name); printf(请输入学生的年龄:\n);scanf(%d,p1-age); sum_age+=p1-age; if(max_agep1-age) max_age=p1-age; if(min_agep1-age

文档评论(0)

1亿VIP精品文档

相关文档