Пример #1
0
        static void Main(string[] args)
        {
            int   a, b;
            Input inp = new Input();
            Sum   s   = new Sum();

            Difference d = new Difference();
            Product    p = new Product();
            Quotient   q = new Quotient();
            Remainder  r = new Remainder();

            inp.number();


            s.GetSum();
            d.GetDifference();
            p.GetProduct();
            q.GetQuotient();
            r.GetRemainder();


            Console.WriteLine("\nSUM:\t\t" + DeclareVar.Sum);
            Console.WriteLine("\nDIFFERENCE:\t\t" + DeclareVar.Difference);
            Console.WriteLine("\nPRODUCT:\t\t" + DeclareVar.Product);
            Console.WriteLine("\nQUOTIENT:\t\t" + DeclareVar.Quotient);
            Console.WriteLine("\nREMAINDER:\t\t" + DeclareVar.Remainder);

            Console.ReadLine();
        }
Пример #2
0
        public void Declaringvar()
        {
            double     a, b;
            Sum        s  = new Sum();
            Difference d  = new Difference();
            Product    p  = new Product();
            Quotient   t  = new Quotient();
            Remainder  r  = new Remainder();
            Input      ip = new Input();

            a = ip.number1();
            b = ip.number2();


            System.Console.WriteLine("Sum\t\t:\t\t " + s.AcceptSum(a, b));
            System.Console.WriteLine("");
            System.Console.WriteLine("Difference\t:\t\t " + d.getDifference(a, b));
            System.Console.WriteLine("");
            System.Console.WriteLine("Product\t\t:\t\t " + p.getProduct(a, b));
            System.Console.WriteLine("");
            System.Console.WriteLine("Quotient\t:\t\t {0:0.00} ", t.getQuotient(a, b));
            System.Console.WriteLine("");
            System.Console.WriteLine("Remainder\t:\t\t " + r.getRemainder(a, b));
        }