

for (int i = 1; i < 10; i++)
{
for (int j = 1; j < 10; j++)
{
if (i <= j && i + j <= 10 || i >= j && i + j >= 10)
{
Console.Write("*");
}
else
{
Console.Write(" ");
}
}
Console.WriteLine();
}
网友评论