首页 > 其他 > 详细

Show a heart shaped

时间:2014-06-06 22:44:24      阅读:419      评论:0      收藏:0      [点我收藏+]

 

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!