Console.Write("请输入直角三角形的行数:");
int a = Convert.ToInt32(Console .ReadLine ());
for (int b = 0; b < a + 1; b++)
{
for (int c = 1; c < b * 2; c++)
{
Console.Write("*");
}
Console.WriteLine("");
}
Console.ReadKey();
网友评论