这题要使用一个函数,叫做 max ,它可以直接比较出大的那个数。
有了这个函数就很简单了。
AC CODE:
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<max(a,b)<<endl;
return 0;
}
又是一道水题~~~~~~
这题要使用一个函数,叫做 max ,它可以直接比较出大的那个数。
有了这个函数就很简单了。
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<max(a,b)<<endl;
return 0;
}
又是一道水题~~~~~~