Example #1
0
        static void Main(string[] args)
        {
            Console.WriteLine();
            Frac a = new Frac(1, 5);
            Frac b = new Frac();
            Frac c = a + b;
            Frac d = a - b;
            Frac e = a * b;
            Frac f = a / b;

            //IMPRIMIR DATOS
            a.imprime();
            b.imprime();
            c.imprime();
            d.imprime();
            e.imprime();
            f.imprime();

            Console.ReadKey();
        }
Example #2
0
        //DIVISIÓN
        public static Frac operator /(Frac x, Frac y)
        {
            Frac result = new Frac(x.num * y.den, x.den * y.num);

            return(result);
        }