Пример #1
0
        public static void Main(string[] args)
        {
            Declarevar dv = new Declarevar();

            dv.Declaringvar();



            Sum        s  = new Sum();
            Difference d  = new Difference();
            Product    p  = new Product();
            Quotient   t  = new Quotient();
            Remainder  r  = new Remainder();
            Input      ip = new Input();

            ip.getInput();
            s.AcceptSum();
            d.getDifference();
            p.getProduct();
            t.getQuotient();
            r.getRemainder();


            System.Console.WriteLine("Sum\t\t:\t\t " + Declarevar.Sum);
            System.Console.WriteLine("Difference\t:\t\t " + Declarevar.Difference);
            System.Console.WriteLine("Product\t\t:\t\t " + Declarevar.Product);
            System.Console.WriteLine("Quotient\t:\t\t " + Declarevar.Quotient);
            System.Console.WriteLine("Remainder\t:\t\t " + Declarevar.Remainder);

            Console.ReadKey();
        }
Пример #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("Difference\t:\t\t " + d.getDifference(a, b));
        System.Console.WriteLine("Product\t\t:\t\t " + p.getProduct(a, b));
        System.Console.WriteLine("Quotient\t:\t\t " + t.getQuotient(a, b));
        System.Console.WriteLine("Remainder\t:\t\t " + r.getRemainder(a, b));
    }