Пример #1
0
        public static RationalNumber operator *(RationalNumber RatNum1, RationalNumber RatNum2)
        {
            RationalNumber RatNum = new RationalNumber();

            RatNum.SetNumerator(RatNum1.GetNumerator() * RatNum2.GetNumerator());
            RatNum.SetDenominator(RatNum1.GetDenominator() * RatNum2.GetDenominator());
            return(RatNum);
        }
Пример #2
0
 public static bool operator >(RationalNumber RatNum1, RationalNumber RatNum2)
 {
     return((RatNum1.GetNumerator() / RatNum1.GetDenominator()) > (RatNum2.GetNumerator() / RatNum2.GetDenominator()));
 }