static void Main(string[] args)
        {
            Console.Write("Please enter number to do math operations on: ");
            int number = Convert.ToInt32(Console.ReadLine());

            int addEqual = MathClass.Add(number);
            int subEqual = MathClass.Subtract(number);
            int mulEqual = MathClass.Multiply(number);

            Console.WriteLine("Addition: " + addEqual);
            Console.WriteLine("Subtracion: " + subEqual);
            Console.WriteLine("Multiply: " + mulEqual);
            Console.ReadLine();            
        }        
Exemple #2
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Enter a number");
            int       num       = Convert.ToInt32(Console.ReadLine());
            MathClass mathClass = new MathClass();
            int       result1   = mathClass.MathOperation1(num);

            Console.WriteLine("You number + 100 equals " + result1);

            int result2 = mathClass.MathOperation2(num);

            Console.WriteLine("You number * 100 equals " + result2);

            int result3 = mathClass.MathOperation3(num);

            Console.WriteLine("You number / 2 equals " + result3);

            Console.ReadLine();
        }