Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            try
            {
                Console.WriteLine("Enter Any Number:");
                int value = Convert.ToInt32(Console.ReadLine());

                Marvellous.Accept(value);
            }
            catch (InvalidNumberException e)
            {
                Console.WriteLine(e);
            }

            Console.WriteLine("Termination of Application..");
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Enter size:");
            int value = Convert.ToInt16(Console.ReadLine());

            Marvellous mobj = new Marvellous(value);

            mobj.Accept();

            Thread t1 = new Thread(new ThreadStart(mobj.EvenDisplay));

            Thread t2 = new Thread(new ThreadStart(mobj.OddDisplay));

            t1.Start();

            t2.Start();
        }