usingSystem;publicclassProgram{publicstaticvoidMain(){Console.Write("Enter the number of rows for the pyramid: ");intnumRows=int.Parse(Console.ReadLine());for(inti=1;i<=numRows;i++){for(intj=1;j<=i;j++){Console.Write(i);}Console.WriteLine();}}}
1
2
3
4
5
6
Enter the number of rows for the pyramid: **5**
122333444455555