Fig: Screenshot of Output |
using System;
class PatternTest
{
public static void Main()
{
int j,row,r=1;
Console.Write("Enter the no. of row: ");
row=Convert.ToInt32(Console.ReadLine());
//int temp=row;
for(;row>=1;row--,r++)
{
for(j=r;j>1;j--)
Console.Write(" ");
for(j=1;j<=row;j++)
Console.Write(j);
Console.WriteLine();
}
}
}