static void Main(string[] args)
        {
            MyMath result1 = new MyMath();

            result1.Multiply(2, 3);
            Console.WriteLine("The result is: " + result1.getResult());

            result1.Divide(2, 3);
            Console.WriteLine("The result is: " + result1.getResult());

            result1.Add(2, 3);
            Console.WriteLine("The result is: " + result1.getResult());

            result1.Subtract(2, 3);
            Console.WriteLine("The result is: " + result1.getResult());
        }
Exemple #2
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 #3
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());
        }
Exemple #4
0
        static void Main(string[] args)
        {
            //This doesn't meet all the requirements of the assignment, but it's as close as I can get right now
            //I'm not sure how to use the GetResult method in combination with the void methods in MyMath class

            MyMath MM = new MyMath();

            double operand1;
            double operand2;
            double result;



            MM.Multiply(30, 2);
            MM.Divide(35, 7);
            MM.Add(23, 2);
            MM.Subtract(17, 2);
        }