1

try { Console.WriteLine("请输入直角三角形高度"); int i = Convert.ToInt32(Console.ReadLine()); int a, b; for (a = 1; a <= i; a++)//行数 { for (b = 1; b <= 2 * a - 1; b++) { Console.Write("*"); } Console.WriteLine (); } } catch { } Console.ReadKey(); } } }

你可能感兴趣的:(1)