}
while (falg);// 下面就是输出菱形
for (int i = 1; i <= l / 2 + 1; i++)//先输出*递增的几行
{
for (int j = 1; j <= l / 2 - i + 1; j++)
Console.Write(" ");
for (int k = 1; k <= 2 * i - 1; k++)
Console.Write("*");
Console.WriteLine();
}
for (int i = 1; i <= l / 2; i++)//再输出*递减的几行
{
for (int j = 1; j <= i; j++)
Console.Write(" ");
for (int j = 1; j <= l - 2 * i; j++)
Console.Write("*");
Console.WriteLine();
}
Console.ReadKey();