C语言程序设计精编教程课件作者陈正权岳睿第9章节结构体与共用体.pptVIP

  • 4
  • 0
  • 约1.32万字
  • 约 57页
  • 2018-05-08 发布于广东
  • 举报

C语言程序设计精编教程课件作者陈正权岳睿第9章节结构体与共用体.ppt

void main() { void input(struct student stu[ ]); struct student max(struct student stu[ ]); void print(struct student stu); struct student stu[N],*p=stu; input(p); print(max(p)); } void input(struct student stu[ ]) { int i; for(i=0;iN;i++) {scanf(“%d %s %f %f %f”, stu[i].num,stu[i].name,stu[i].score[0], stu[i].score[1], stu[i].score[2]); stu[i].aver=(stu[i].score[0]+sut[i].score[1]+stu[i].score[2])/3.0; } struct student max(struct student stu[ ]) { int i,m=0; for(i=0;iN;i++) if (stu[i].averstu[m].aver) m=i; return stu(m);} void print(struct student s

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档