首页 > 其他 > 详细

扫雷背景

时间:2014-04-04 08:12:57      阅读:535      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
bubuko.com,布布扣
 1 #include <graphics.h>
 2 #include <conio.h>
 3 void k(int x,int y)
 4 {int a,b;
 5       setcolor(RGB(200,200,200));
 6       for(a=x,b=y;a>x-4&&b<y+4;b++,a--)
 7           line(x, b, a+40, b);
 8       for(a=x,b=y;a<x+4&&b>y-4;a++,b--)
 9           line(a, y, a, b+40);
10       setcolor(RGB(55,55,55));
11       for(a=x,b=y;a>x-4&&b<y+4;b++,a--)
12           line(a+40, b, a+40, b+40);
13       for(a=x,b=y;a<x+4&&b>y-4;b--,a++)
14           line(a, b+40, a+40, b+40);
15 }
16 void main()
17 {int i,j;
18       initgraph(640, 640);
19       setbkcolor(RGB(127,127,127));
20 cleardevice();
21 for(i=0;i<=640;i+=40)
22     for(j=0;j<=640;j+=40)
23         k(i,j);
24       getch();
25       closegraph();
26 }
View Code
bubuko.com,布布扣

 

扫雷背景,布布扣,bubuko.com

扫雷背景

原文:http://www.cnblogs.com/firstsy0709/p/3643855.html

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