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();
}