Exemple #1
0
        static void Main(string[] args)
        {
            MyMath myResult1 = new MyMath();

            myResult1.Multiply(2, 5);
            Console.WriteLine(myResult1.GetResult());

            myResult1.Divide(10, 5);
            Console.WriteLine(myResult1.GetResult());

            myResult1.Subtract(7, 6);
            Console.WriteLine(myResult1.GetResult());

            myResult1.Add(8, 4);
            Console.WriteLine(myResult1.GetResult());
        }
Exemple #2
0
        static void Main(string[] args)
        {
            MyMath iMyMath = new MyMath();



            iMyMath.Multiply(10, 20);
            Console.WriteLine("The result for multiplication is: " + iMyMath.GetResult());

            iMyMath.Divide(30, 20);
            Console.WriteLine("The result of division is:" + iMyMath.GetResult());

            iMyMath.Subtract(20, 10);
            Console.WriteLine("The result of subtraction is:" + iMyMath.GetResult());

            iMyMath.Add(100, 200);
            Console.WriteLine("The result of addition is:" + iMyMath.GetResult());
        }