using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace _2class Programstatic void Main(string args)Console.WriteLine(“说明:n代表金字塔的行 “);Console.WriteLine();int n ;/ n:行Console.WriteLine(“输入一个数(n):“);n=int.Parse(Console.ReadLine();int d = n * 2 - 1;/列与行的关系式 /上半部菱形for (int i = 1; i = 1; i-)for (int j = n - i ; j = 1; j-)Console.Write(“ “);for (int j = 1; j = i; j+)Console.Write(“ *“);Console.Write(“n“);/换行 Console.ReadKey();