#include<iostream>
using namespace std;
int max(int n1,int n2)
{
int m;
if(n1>n2)
m=n1;
else
m=n2;
return m;
}
int main()
{
int a,b,c;
int(*p)(int a,int b);
p=max;
cout<<"请输入两个数"<<endl;
cin>>a>>b;
c=(*p)(a,b);
cout<<"较大的数是:"<<endl;
cout<<c;
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: