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
Reviewed by Bhaumik Patel
on
9:28 PM
Rating:
![Write a program in C# Sharp to make such a pattern like a pyramid with numbers increasing by 1](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOI5U46d_zfGYkp7lF4S67XVmkJS6pZxKsawxKQ-4fOu3H2EBfIqH7PjYwRyF5TY5tIagYzQYNX0fS3hRmoQ2wKu-Q7N31A9Qr97xDqLtGqhwPeDvTA_Iqp5PRZKqzX-G3XSmaqZvTBf1ie-dhFOcFAJkDt9er_pY1FKyeWWSQCr-USRHQU5Wb7gLhWMp1/s72-c/10.png)