题解 | #求最大值#
求最大值
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; }