예제 #1
0
        /// <summary>
        /// Method to Print the numbers
        /// </summary>
        public static void Integernumber()
        {
            try
            {
                Console.WriteLine("enter the number");
                int number = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("enter the array element");
                int[] array = new int[number];
                for (int i = 0; i < number; i++)
                {
                    array[i] = Convert.ToInt32(Console.ReadLine());
                }

                UtilityClass.Integer(array, number);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
예제 #2
0
        /// <summary>
        /// Method to find the Qudratic Equation
        /// </summary>
        public static void Equation()
        {
            try
            {
                Console.Write("\n");
                Console.Write("Calculate root of Quadratic Equation :\n");
                Console.Write("\n");

                Console.Write("Input the value of a ");
                int a = Convert.ToInt32(Console.ReadLine());
                Console.Write("Input the value of b ");
                int b = Convert.ToInt32(Console.ReadLine());
                Console.Write("Input the value of c ");
                int c = Convert.ToInt32(Console.ReadLine());
                UtilityClass.Quadratic(a, b, c);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }