菱形

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
           for (int i = 1; i <= 10; i++)
            {
                for (int a = 1; a <= 10 - i;a++)
                {
                    Console.Write("  ");
                }
                for (int b = 1; b <=2*i-1;b++)
                {
                    Console.Write("");
                }
                Console.WriteLine("\n");
            }
            for (int k = 1; k < 10; k++)
            {
                for (int d = 1; d <= k; d++)
                {
                    Console.Write("  ");
                }
                for (int c = 1; c <= 2 * (10 - k) - 1; c++)
                {
                    Console.Write("");
                }
               
                Console.WriteLine("\n");
            }
        }
    }
}

 

posted @ 2015-06-18 16:04  蓝瑟黄昏  阅读(119)  评论(0编辑  收藏  举报