![](https://img.haomeiwen.com/i14498955/9a7524d5707d0cc0.jpg)
Console.Write("输入行数:");
string str_a = Console.ReadLine();
int a = Convert.ToInt32(str_a);
for (int i = 1; i <= a; i++)
{
for (int j = 0; j < 2*i-1; j++)
{
Console.Write("*");
}
Console.WriteLine();
}
Console.ReadKey();
Console.Write("输入行数:");
string str_a = Console.ReadLine();
int a = Convert.ToInt32(str_a);
for (int i = 1; i <= a; i++)
{
for (int j = 0; j < 2*i-1; j++)
{
Console.Write("*");
}
Console.WriteLine();
}
Console.ReadKey();
本文标题:第十五节课第一个作业
本文链接:https://www.haomeiwen.com/subject/hbbekqtx.html
网友评论