static void Main(string[] args)
{
int num = 9;
for (int i = 1; i <= num; i++)
{
for (int j = 1; j <= num - i; j++)
Console.Write(" "); //write " "
for (int k = 1; k <= i- 1; k++)
Console.Write(i - k + 1); //write 左半边
Console.Write("1");
//write 中间的1
for (int k = 1; k <= i-1; k++)
Console.Write(k + 1);//write 右半边
Console.WriteLine("");
}
Console.ReadLine();
}