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

            obj.Sum(2, 0);
            Console.WriteLine("This is a Logger Demo");
            Console.ReadLine();
        }
Пример #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Addition Problem \nEnter a & b values");
            int       a   = int.Parse(Console.ReadLine());
            int       b   = int.Parse(Console.ReadLine());
            AddNumber add = new AddNumber();

            Console.WriteLine("Result : " + add.Sum(a, b));
        }
Пример #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Addition problem \n Enter a,b values");
            int       a   = Convert.ToInt32(Console.ReadLine());
            int       b   = Convert.ToInt32(Console.ReadLine());
            AddNumber add = new AddNumber();

            Console.WriteLine("Result is" + " " + add.Sum(a, b));
        }
Пример #4
0
        static void Main(string[] args)
        {
            Console.WriteLine("Enter the first number for addtion");
            int firstNumber = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Enter the first number for addtion");
            int secondNumber = Convert.ToInt32(Console.ReadLine());

            AddNumber addNumbers = new AddNumber();

            Console.WriteLine("Addition of " + firstNumber + "and" + secondNumber + "is" + addNumbers.Add(firstNumber, secondNumber));
        }