Input : Number of Rows

Output :

1
22
333
4444
55555

Code

        public static void PrintNumberPattern4(int rows)
        {
            for (int i = 1; i <= rows; i++)
            {
                for (int j = 1; j <= i; j++)
                {
                    Console.Write(i);
                }
                Console.WriteLine("");
            }
        }