当前位置:网站首页>YTU 2411: 谁去参加竞赛?【简单循环】
YTU 2411: 谁去参加竞赛?【简单循环】
2022-08-11 01:57:00 【51CTO】
2411: 谁去参加竞赛?【简单循环】
时间限制: 1 Sec 内存限制: 64 MB
提交: 461
解决: 261
题目描述
学校要举办大学生程序设计竞赛,老师要求期末考试成绩在平均成绩以上的同学都去参赛。谁去参赛?那得先算出平均成绩。
输入
输入若干个0-100间的数表示成绩,为适应不同人数的班级,人数不确定,输入以一个负数结束。(为简单起见,不必对输入数据是否超出100进行限制)
输出
成绩的平均值(输出保留1位小数)
样例输入
样例输出
提示
C语言中,将printf("%.1f\n",x); 可以令x的值保留1位小数输出。
C++中,cout<<setiosflags(ios::fixed)<<setprecision(1)<<x<<endl;令x的值保留1位小数输出,另外,需加头文件#include<iomanip>
迷失在幽谷中的鸟儿,独自飞翔在这偌大的天地间,却不知自己该飞往何方……
边栏推荐
- Deep Learning [Chapter 2]
- 13.cuBLAS开发指南中文版--cuBLAS中的Level-1函数copy()和dot()
- Pytorch/TensorFlow/Numpy常用函数汇总
- Ora - 00001 in violation of the only constraint
- [Detailed explanation of C data storage] (1) - in-depth analysis of the storage of shaping data in memory
- shell [stdin/stdout/stderr][重定向]
- 络达开发---自定义BLE服务(二):功能实现
- 一次简单的 JVM 调优,拿去写到简历里
- The classification of inter-process communication (IPC) and the development of communication methods
- Section 4-6 of the first week of the second lesson: Appreciation of medical prognosis cases + homework analysis
猜你喜欢
随机推荐
进程间通信方式(2)有名管道
导入数据包上传宝贝提示“类目不能为空”是什么原因,怎么解决?
想进阿里?先来搞懂一下分布式事务
MySQL基础篇【第一篇】| 数据库概述及数据准备、常用命令、查看表结构步骤
OptiFDTD应用:用于光纤入波导耦合的硅纳米锥仿真
Vim take on a window.
经典面试题 之 GC垃圾收集器
数据库数据采集利器FlinkCDC
Pytorch/TensorFlow/Numpy常用函数汇总
【备战“金九银十”】2022年软件测试面试题最新汇总
如何开展性能测试,你知道吗?
阿里的数据同步神器——Canal
zerorpc:async=True can be written as **{“async“: True}
【开源】壁纸软件,给自己电脑设计专属特效
How to create an index when sql uses where and groupby?
Detailed explanation of common methods of filtering matrix (array) elements in Matlab
Deep Learning【第二章】
报错处理:org.xml.sax.SAXParseException: 不允许有匹配 “[xX][mM][lL]“ 的处理指令目标
nvidia-smi:控制你的 GPU
Section 4-6 of the first week of the second lesson: Appreciation of medical prognosis cases + homework analysis









