Write a program in C# Sharp to make such a pattern like a pyramid with numbers increasing by 1

 


using System;

class PyramidNumbers {
    public static void Main(string[] args) {
        int rows, num = 1;

        Console.WriteLine("Enter the number of rows: ");
        rows = Convert.ToInt32(Console.ReadLine());

        for (int i = 1; i <= rows; i++) {
            for (int j = 1; j <= i; j++) {
                Console.Write(num++);
            }
            Console.WriteLine();
        }
    }
}
Write a program in C# Sharp to make such a pattern like a pyramid with numbers increasing by 1 Write a program in C# Sharp to make such a pattern like a pyramid with numbers increasing by 1 Reviewed by Bhaumik Patel on 9:28 PM Rating: 5