3个回答
展开全部
for (int i = -3; i <= 3; i++) {
for (int j = 0; j < Math.Abs(i); j++) {
label1.Text += " ";
}
for (int k = 1; k <= 4 - Math.Abs(i); k++) {
label1.Text += "*";
}
label1.Text += "\n";
}
如假包换
for (int j = 0; j < Math.Abs(i); j++) {
label1.Text += " ";
}
for (int k = 1; k <= 4 - Math.Abs(i); k++) {
label1.Text += "*";
}
label1.Text += "\n";
}
如假包换
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
for (int i = 0; i <= 5; i++)
{
for (int j = 0; j < 5 - i; j++)
{
Console.Write(" ");
}
for (int k = 0; k < i + 1; k++)
{
Console.Write("*");
}
Console.WriteLine(" ");
}
for (int i = 0; i <= 5; i++)
{
for (int k = 0; k < i + 1; k++)
{
Console.Write(" ");
}
for (int j = 1; j < 5 + 1 - i; j++)
{
Console.Write("*");
}
Console.Write("\n");
}
Console.ReadKey()
{
for (int j = 0; j < 5 - i; j++)
{
Console.Write(" ");
}
for (int k = 0; k < i + 1; k++)
{
Console.Write("*");
}
Console.WriteLine(" ");
}
for (int i = 0; i <= 5; i++)
{
for (int k = 0; k < i + 1; k++)
{
Console.Write(" ");
}
for (int j = 1; j < 5 + 1 - i; j++)
{
Console.Write("*");
}
Console.Write("\n");
}
Console.ReadKey()
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询