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