示例#1
0
文件: Mixed.cpp 项目: AwenHuang/OOP
Mixed Mixed::operator /(Mixed &p){
		p.ToFraction();
		Mixed tmp(0, b*p.c,c*p.b);
		tmp.Simplify();
		return tmp;
}
示例#2
0
文件: Mixed.cpp 项目: AwenHuang/OOP
Mixed Mixed::operator +(Mixed &p){
		p.ToFraction();
		Mixed tmp(0, (b*p.c) + (p.b*c),c*p.c);
		tmp.Simplify();
		return tmp;
}
示例#3
0
文件: Mixed.cpp 项目: AwenHuang/OOP
Mixed Mixed::operator -(Mixed &p){
		p.ToFraction();
		Mixed tmp(0, (b*p.c) - (p.b*c),c*p.c);
		tmp.Simplify();
}
示例#4
0
文件: Mixed.cpp 项目: AwenHuang/OOP
bool Mixed::operator !=(Mixed &p){
		p.ToFraction();
		int y = p.get_y(), z = p.get_z();
		return ((((b*z) != (y*c)))?1:0);
}