编辑代码

#include <iostream>
using namespace std;
int main() {
    int i = 0,x,max;
    cin>>x;
    max=x;
    while(cin>>x){
      max=max > x ? max : x; 
    }
    cout<<max<<endl;
	return 0;
}