给出两个数x和y,求出两数的大者
#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,c;
cout<<"Please input two numbers:\n";
cin>>a>>b;
c=max(a,b);
cout<<"maximum number is "<<c<<endl;
return 0;
}