We are providing online training of realtime Live project on Asp.Net MVC with Angular and Web API. For more information click here. If you have any query then drop the messase in CONTACT FORM

Sunday, June 14, 2015


   class Program
    {
        static void Main(string[] args)
        {

            Console.WriteLine("Enter the string");
            string s = Console.ReadLine();
            int n = s.Length - 1;
            for (int row = 0; row <= n; row++)
            {

                Console.Write(s[row] + " ");
            }

            Console.WriteLine();

            for (int row = 1; row <= n; row++)
            {

                for (int coll = 0; coll <= n; coll++)
                {

                    if (row == n - coll)
                    {

                        Console.Write(s[row] + "                            " + s[coll]);
                    }
                }

                Console.WriteLine();

            }

            for (int row = n; row >= 0; row--)
            {

                Console.Write(s[row] + " ");

            }

            Console.WriteLine();
            Console.ReadLine();

        }

    }

No comments: