当前位置:网站首页>-最高分-
-最高分-
2022-08-03 05:10:00 【-JMY-】
题目描述
五年级一班刚刚结束了一场考试,老师想知道最高分是多少,但是由于人数比较多,请你用编程来帮助老师。
输入
两行,第一行为整数n(1<=n<=100),表示参加考试的人数;
第二行是这n个学生的成绩,所有成绩都在0~100之间。
输出
输出最高成绩
样例输入
5 85 78 90 99 60
样例输出
99
参考代码:
#include<iostream>
using namespace std;
int main()
{
int maxn;
int n,a,b;
cin>>n;
for(int i=-1;i<=n;i++)
{
cin>>a;
if(a>maxn)
{
maxn=a;
}
}
cout<<maxn;
return 0;
}
边栏推荐
猜你喜欢
How to prepare for the test interface test data
ModelArts第二次培训
Installation of Apache DolphinScheduler version 2.0.5 distributed cluster
Ali cloud object storage oss private barrels to generate links
web安全-PHP反序列化漏洞
GIS数据漫谈(六)— 投影坐标系统
Djiango第四次培训笔记
2. 两数相加
第三次HarmonyOS培训
Detailed explanation of MOSN reverse channel
随机推荐
Unity2D horizontal board game tutorial 6 - enemy AI and attack animation
Exception (abnormal) and Error (error) difference analysis
Presto installation and deployment tutorial
Installation of Apache DolphinScheduler version 2.0.5 distributed cluster
Coordinate knowledge in digital twin campus scenarios
2022暑假牛客多校联赛第一场
Ali cloud object storage oss private barrels to generate links
[Fine talk] Using native js to implement todolist
Exception(异常) 和 Error(错误)区别解析
Djiango第三次培训
IO process thread -> thread -> day5
快速上手 Mockito 单元测试框架
mysql 存储过程 动态参数 查询执行结果
1069 微博转发抽奖 (20 分)(C语言)
【Biotin Azide|cas:908007-17-0】Price_Manufacturer
Gradle的安装配置
Technology Sharing | How to do assertion verification for xml format in interface automation testing?
1. 两数之和
UV decomposition of biotin - PEG2 - azide | CAS: 1192802-98-4 biotin connectors
高效率科研神器——小软件、大能量