Beispiel #1
0
            public void NSubtractTest()
            {
                MathsHelper helper = new MathsHelper();
                int         result = helper.sub(20, 10);

                Assert.AreEqual(14, result);
            }
        static void Main(string[] args)
        {
            Console.WriteLine("Enter two number\n");
            int num1, num2;

            num1 = int.Parse(Console.ReadLine());
            num2 = int.Parse(Console.ReadLine());
            MathsHelper helper = new MathsHelper();
            int         x      = helper.add(num1, num2);

            Console.WriteLine("\n The sum of " + num1 + " and " + num2 + " is " + x);
            int y = helper.sub(num1, num2);

            Console.WriteLine("\n The differance between " + num1 + " and " + num2 + " is " + y);
            Console.ReadKey();
        }