#代码
string m = Console.ReadLine();
int n = Convert.ToInt32(m);
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= n - i; j++)
{
Console.Write("");
}
for (int j = 1; j <= 2 * i - 1; j++)
{
Console.Write("*");
}
Console.WriteLine();
}
Console.WriteLine();
Console.ReadKey();
}
}
}
网友评论