Console.WriteLine("请输入直角三角形的行数:");
int a = Convert.ToInt32(Console .ReadLine ());
for (int i = 1; i <= a; i++)
{
for (int j = 0; j < 2 * i - 1; j++)
{
Console.Write("*");
}
Console.WriteLine();
}
Console.ReadKey();
}
Console.WriteLine("请输入直角三角形的行数:");
int a = Convert.ToInt32(Console .ReadLine ());
for (int i = 1; i <= a; i++)
{
for (int j = 0; j < 2 * i - 1; j++)
{
Console.Write("*");
}
Console.WriteLine();
}
Console.ReadKey();
}
本文标题:2018-12-20训练一
本文链接:https://www.haomeiwen.com/subject/amcykqtx.html
网友评论