2018-12-20正直角三角形

 Console.Write("请输入直角三角形的行数:");
        int a = Convert.ToInt32(Console .ReadLine ());
        for (int b = 0; b < a + 1; b++)
        {
            for (int c = 1; c < b * 2; c++)
            {
                Console.Write("*");

            }
            Console.WriteLine("");
        }
        Console.ReadKey();

你可能感兴趣的:(2018-12-20正直角三角形)