#include<iostream>
using namespace std;
int max1(int x,int y)
{
return x>y?x:y;
}
int main()
{
int max1(int,int);
int (*f)(int,int)=&max1;//函数指针
int a,b,c,d;
cout<<"Enter three numbers:"<<endl;
cin>>a>>b>>c;
d=(*f)((*f)(a,b),c);
cout<<"The largest number is: "<<d<<endl;
return 0;
}
using namespace std;
int max1(int x,int y)
{
return x>y?x:y;
}
int main()
{
int max1(int,int);
int (*f)(int,int)=&max1;//函数指针
int a,b,c,d;
cout<<"Enter three numbers:"<<endl;
cin>>a>>b>>c;
d=(*f)((*f)(a,b),c);
cout<<"The largest number is: "<<d<<endl;
return 0;
}