当前位置:网站首页>-最高分-
-最高分-
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;
}
边栏推荐
- 初步认识ZK
- Interface testing framework combat (3) | JSON request and response assertion
- Exception(异常) 和 Error(错误)区别解析
- Djiango第二次培训
- Unity2D horizontal board game tutorial 6 - enemy AI and attack animation
- Installation of Apache DolphinScheduler version 2.0.5 distributed cluster
- 用scikit-learn学习谱聚类
- ss-1.curl (cloud-provider-payment8001)
- VR全景展打造专属元宇宙观展空间
- 高可用 两地三中心
猜你喜欢

tag单调栈-单调栈预备知识-lt.739. 每日温度

junit总结

安装IIS服务(Internet信息服务(Internet Information Services,简写IIS,互联网信息服务)

Common lipophilic cell membrane dyes DiO, Dil, DiR, Did spectrograms and experimental procedures
网络流媒体下载的 10 种方法(以下载 Echo 音乐为例)

MySql数据库

BIOTIN ALKYNE CAS: 773888-45-2 Price, Supplier

MCM box model modeling method and source analysis of atmospheric O3

Common fluorescent dyes to modify a variety of groups and its excitation and emission wavelength data in the data

typescript41-class类的私有修饰符
随机推荐
Flink state
Harmony OS Date ano UI 】 【 】 the basic operation
1069 微博转发抽奖 (20 分)(C语言)
Exception (abnormal) and Error (error) difference analysis
Unity2D horizontal board game tutorial 6 - enemy AI and attack animation
typescript49-交叉类型
斐讯K2路由编译Padavan华硕固件和心得
web安全-sql注入漏洞
高效率科研神器——小软件、大能量
ModelArts第二次培训
在树莓派上搭建属于自己的网页(2)
User password encryption tool
UV decomposition of biotin - PEG2 - azide | CAS: 1192802-98-4 biotin connectors
用户密码验证
Shell conditional statement judgment
junit总结
Install PostgreSQL on Windows
CAD有生僻字如何打出来、如何提交软件相关问题或建议?
第三次HarmonyOS培训
shell script loop statement