int main()
{
int ix,jx;
cin >> ix >> jx;
cout << "the max is:" << max(ix, jx) << endl;
return 0;
}
...全文
1148打赏收藏
还是函数模版!
#include using namespace std; template T max(T ix, T jx) { return ix > jx ? ix : jx; } int main() { int ix,jx; cin >> ix >> jx; cout << "the max is:" << max(ix, jx) << endl; return 0; }