cout << "max=" <<m<<endl;
代码修改如下,如有帮助,请帮忙采纳一下,谢谢。
#include <iostream>
using namespace std;
int max(int x,int y)
{
int z;
if(x>y) z=x;
else z=y;
return z;
}
int main()
{
int a,b,m;
cin >>a>>b;
m=max(a,b);
cout << "max="<<m<<endl;
return 0;
}