满意答案
insect619
2013.08.27
采纳率:40% 等级:12
已帮助:8774人
#include
class num
{
public:
float GetMax(float a,float b,float c)//返回最大值
{
float x=a>b ? a:b;
return x>c?x:c;
}
int GetMax(int a,int b,int c)//返回最大值
{
int x=a>b ? a:b;
return x>c?x:c;
}
float GetMin(float a,float b,float c)//返回最小值
{
float x=a
return x
}
int GetMin(int a,int b,int c)//返回最小值
{
int x=a
return x
}
float GetAverage(float a,float b,float c)//返回平均值
{
return (float)((a+b+c)/3.0);
}
int GetAverage(int a,int b,int c)//返回平均值
{
return ((a+b+c)/3);
}
};
void main()
{
num n;
float a,b,c;
int d,e,f;
cout<
cin>>a>>b>>c;
cout<
cout<
cin>>d>>e>>f;
cout<
return ;
}
00分享举报