static void Main(string[] args)
{
for (int row = 1; row <= 5; row++)
{
string output = "*".PadRight(row * 2 - 1, '*');
output = output.PadLeft(output.Length + 5 - row, ' ');
Console.WriteLine(output);
}
for (int row = 4; row >= 1; row--)
{
string output = "*".PadRight(row * 2 - 1, '*');
output = output.PadLeft(output.Length + 5 - row, ' ');
Console.WriteLine(output);
}
Console.ReadKey();
}
这个编程可以实现之·· · |