#include<bits/stdc++.h> using namespace std; int main() { int x,maxx = 0; //公理:求最大值时,要初始化最小 for(int i = 1; i <= 5; i++) //循环5次 { cin >> x; if(x > maxx) //如果x比最大值maxx大 maxx = x; //更新最大值maxx } cout << maxx; return 0; }