c语言实验第九次.docxVIP

  • 8
  • 0
  • 约2.83千字
  • 约 5页
  • 2022-12-14 发布于江苏
  • 举报
南京信息工程大学 实验(实习)报告 实验(实习)名称 结构体及其应用 日期 2022.6.10得分 指导教师 李含光 学院 环科院 专业 给排水 年级 2021 班次 1 姓名 王从宇 学号 202113850005 1.实验目的 (1)掌握结构体变量与结构体数组的定义和使用。 (2)学会使用结构体指针变量和结构体指针数组。 (3)掌握链表的概念,初步学会对链表进行操作。 2.实验内容 (1)输入10个学生的学号、姓名和成绩,求出其中的高分者和低分者。 #include stdio.h struct student { int num; char name[20]; int score; }; int main( ) { int i; struct student st,stmax,stmin; stmax.score=0; stmin.score=100; printf(\n input data); for(i=0;i10;i++) { scanf(%d%s%d,st.num,st.name,st.score); if(st.scorestmax.score) stmax=st; if(st.scorestmin.score) stmi

文档评论(0)

1亿VIP精品文档

相关文档