
Class Features 133
float min1(float a,float b,float c)
{
float lowest;
if (a<b)
lowest= a;
else
lowest=b;
if(c<lowest)
lowest=c;
return lowest;
}
}
namespace Amrik
{
float x=17.07;
float max1(float a,float b,float c)
{
float highest=(a > b)&& ( a > c)? a : (b >c) ? b : c ;
return highest;
}
float min1(float a,float b,float c)
{
float lowest=(a < b)&& ( a < c)? a : (b <c) ? b : c ;
return lowest;
}
}
int main()
{
float m1=Amrik::max1(1.1,5.5,12);
float m2=Rex::min1(1.1,5.5,12);
cout<<"Maximum number between (1.1,5.5,12) is "<<m1<<endl;
cout<<"Minimum number between (1.1,5.5,12) is "<<m2<<endl;
m1=Rex::max1(1.1,5.5,12);
m2=Amrik::min1(1.1,5.5,12); ...