Example #1
0
        public static void Main(string[] args)
        {
            NaturalNumber  n = new NaturalNumber(-2);
            IntegerNumber  i = new IntegerNumber(3);
            RationalNumber r = new RationalNumber(i, n);

            r.Write();
            r.Square();
            r.Write();
        }
Example #2
0
 public RationalNumber(IntegerNumber a, NaturalNumber b)
 {
     this.upNumber   = a;
     this.downNumber = b;
 }