博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
结构体的应用-成绩录入初步
阅读量:4694 次
发布时间:2019-06-09

本文共 648 字,大约阅读时间需要 2 分钟。

1 #include
2 #include
3 4 struct student{ 5 int num; 6 char name[20]; 7 int score; 8 }; 9 10 int main(){11 int i;12 struct student st,stmax,stmin;13 stmax.score = 0;14 stmin.score = 100;15 for(i=1;i<=100;i++){16 scanf("%d%s%d", &st.num, st.name, &st.score);17 if(st.score > stmax.score)18 stmax = st;19 if(st.score < stmin.score)20 stmin = st;21 }22 printf("\n %5d%15s%5d", stmax.num, stmax.name, stmax.score);23 printf("\n %5d%15s%5d", stmin.num, stmin.name, stmin.score);24 }

 

转载于:https://www.cnblogs.com/wwcjj/p/8306477.html

你可能感兴趣的文章
IDEA 创建普通的maven+java Project
查看>>
背包专题练习
查看>>
Python学习笔记(二)
查看>>
T-SQL: Create folders in remote server by sql statement
查看>>
linux SVN安装及配置教程
查看>>
poj1088 滑雪问题 dfs写法
查看>>
C# DataTable.Select()方法,条件中使用类型转换
查看>>
Windows7 Questions
查看>>
数据库迁移工具
查看>>
不使用中间变量交换两个变量的值
查看>>
Mysql导入sql文件
查看>>
大道至简:软件工程实践者的思想——第六章感想 从编程到工程
查看>>
SharePoint 2010版本表
查看>>
【BootStrap】初步教程
查看>>
Codeforces Round #152 (Div. 2)总结
查看>>
VC++6.0编译器标记的那些内存值
查看>>
BFC清除浮动
查看>>
Java关键字(五)——this
查看>>
使用tomcat的时候,网页地址出现中文,出现不认识编码导致查询无法完成解决方案...
查看>>
无法启动mysql服务,错误提示 1067:进程意外终止
查看>>