class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter the row number");
            int n = int.Parse(Console.ReadLine());
            for (int row = 1; row <= n; row++)
            {
                for (int coll = 1; coll <= row; coll++)
                {
                    Console.Write(Convert.ToChar(row));
                }
                Console.WriteLine();
            }
                       
            Console.ReadLine();
        }
    }
No comments:
Post a Comment