题解 | #求最大值#

求最大值

https://www.nowcoder.com/practice/d54521e5efa242e8a7fd6ae36f6cf70d

#include <iostream>
#include <limits.h>

using namespace std;

int main () {
	int current;
	int max = INT_MIN;
	for (int i = 0; i < 10; i++){
		cin >> current;
		if (current > max){
			max = current;
		}
	} 
	cout << "max=" << max << endl;
	return 0;
}

全部评论

相关推荐

07-01 19:00
门头沟学院 Java
点赞 评论 收藏
分享
05-22 09:23
门头沟学院 Java
点赞 评论 收藏
分享
05-16 11:16
已编辑
东华理工大学 Java
牛客73769814...:盲猜几十人小公司,庙小妖风大,咋不叫她去4️⃣呢😁
牛客创作赏金赛
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务