예제 #1
0
Number operator * (const int x, const Number& y) {
	return  Number(x * y.GetNum(), y.GetMod());
}
예제 #2
0
Number operator * (const Number& x, const int y) {
	return  Number(x.GetNum() * y, x.GetMod());
}
예제 #3
0
Number operator + (const Number& x, const Number& y) {
	return  Number(x.GetNum() + y.GetNum(), x.GetMod());
}
예제 #4
0
	bool operator != (const Number& x) {
            return (mod != x.GetMod() || num != x.GetNum());
	}
예제 #5
0
    bool operator == (const Number& x) {
		    return (mod == x.GetMod() && num == x.GetNum());
	}
예제 #6
0
    Number operator = (const Number x) {
		mod = x.GetMod();
		num = x.GetNum() % mod;
        return *this;
	}