码迷,mamicode.com
首页 > 其他好文 > 详细

Show a heart shaped

时间:2014-06-06 22:46:00      阅读:208      评论:0      收藏:0      [点我收藏+]

标签:c   a   tar   ext   color   int   

 

Windows Form application version:

private void Form1_Load(object sender, EventArgs e)
        {
            this.BackColor = Color.Red;
            System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
          
            path.AddArc(90, 30, 150, 150, 135, 195);
            path.AddArc(220, 30, 150, 150, 210, 195);
            path.AddLine(112, 159, 230, 290);
            path.AddLine(347, 159, 230, 290);
            path.AddLine(347, 159, 112, 159);
            this.Region = new Region(path);
        }

 

Console application version:

//Set the text colour as RED here            

Console.ForegroundColor = ConsoleColor.Red;

 Console.WriteLine();            

for (int i = 0, m = 1; i < 30; i++)                

for (int l = 0; l < new[] { 5, 6, 7, 6, 8, 10, 3, 10, 4, 13, 1, 13, 1, 87, 1, 27, 4, 23, 7, 20, 11, 16, 16, 11, 20, 7, 24, 3, 27, 1 }[i]; l++, m++)                     System.Console.Write((i % 2 > 0 ? "love"[m % 4] : ‘ ‘) + (m % 29 > 0 ? "" : "\n"));            

Console.WriteLine();

Show a heart shaped,布布扣,bubuko.com

Show a heart shaped

标签:c   a   tar   ext   color   int   

原文地址:http://www.cnblogs.com/Lihao2013/p/3765594.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!