Example #1
0
        static void Main(string[] args)
        {
            phanso a = new phanso();

            a.nhap();
            a.show();
            phanso b = new phanso(a);

            b.show();
            Console.ReadLine();
        }
Example #2
0
        static void Main(string[] args)
        {
            phanso a = new phanso();

            a.nhap();
            a.xuat();
            phanso b = new phanso();

            b.nhap();
            b.xuat();
            phanso c = new phanso();

            c = a.cong(b);
            Console.WriteLine($"tong 2 phan so la :{c.ts}/{c.ms} ");
            c = a.tru(b);
            Console.WriteLine($"hieu 2 phan so la :{c.ts}/{c.ms} ");
            c = a.nhan(b);
            Console.WriteLine($"tich 2 phan so la :{c.ts}/{c.ms} ");
            c = a.chia(b);
            Console.WriteLine($"thuong 2 phan so la :{c.ts}/{c.ms} ");

            Console.ReadLine();
        }