#include <iostream.h>
int max(int a, int b);
double max(double x, double y);
void main()
{
int a=10, b=20 ,c;
double x=200.3, y=400.6,z;
c=max(a,b);
z=max(x,y);
cout<<c<<" "<<z<<endl;
}
int max(int a,int b)
{
if(a>b)
c=a;
else
c=b;
cout<<"int function"<<endl;
return c;
}
double max(double x,double y)
{
if(x>y)
z=x;
else
z=y;
cout<<"float function"<<endl;
return z;
}
guozhchun
leic
相关分类