画倒三角形

namespace _7月3日课堂练习
{
    class Program
    {
        static void Main(string[] args)
        {
            
            hua(5);
            Console.ReadKey();

        }


        public static void hua(int n)
        {
            int res = n;
            while (n>=0)
            {
                string str1 = new string(' ', res - n);
                string str2 = new string('*', 2 * n - 1);
                Console.WriteLine("{0}{1}", str1, str2);
                n--;
            }
           
        }

        
 
    }
}
原文地址:https://www.cnblogs.com/349932030yin/p/2575552.html