结构体实验-参考答案.docxVIP

  • 2
  • 0
  • 约7.07千字
  • 约 9页
  • 2022-11-11 发布于重庆
  • 举报
实验九 结构体 1.有5个学生,每个学生有3门课的成绩,从键盘输入以上数据(包括学号、姓名、3门课成绩),计算出每个学生的总成绩,并将总成绩最高的学生信息(包括学号、姓名、3门课成绩、总成绩)输出。 #include stdio.h struct STU{ char number[7]; char name[10]; int score[3]; int total; }student[5]; int main() { int i,j,n; printf(请输入5个学生的学号、姓名、3门课成绩: \n); for(i=0;i5;i++) { student[i].total

文档评论(0)

1亿VIP精品文档

相关文档