int Min(int x,int y)
{
return (x<y)?x:y;
}
int Min(int x,int y,int z)
{
int t=(x<y)?x:y;
return (t<z)?t:z;
}
double Min(double x,double y)
{
return (x<y)?x:y;
}
double Min(double x,double y,double z)
{
double t=(x<y)?x:y;
return (t<z)?t:z;
}
void main()
{
cout<<Min(4,3)<<"\t"<<Min(9,7,8)<<endl;
cout<<Min(4.0,3.0)<<"\t"<<Min(9.0,7.0,8.0)<<endl;
getch();
}
温馨提示:内容为网友见解,仅供参考