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