利用EasyX画简单的19X19棋盘

#include<conio.h>
#include<graphics.h>
int main()
{
	int i;
	initgraph(610, 610);					//画布大小
	setcolor(BLACK);
	setbkcolor(YELLOW);				        //设置背景颜色
	cleardevice();
	for (i = 2;i<600 ;i +=2)				//画横线
	{
		if (i % 30 == 0)
			line(30, i, 570,i);
	}
	for (i = 2; i<600; i +=2)				//画竖线
	{
		if (i % 30 == 0)
			line(i, 30,  i,570);
	}
	system("pause");
}

猜你喜欢

转载自blog.csdn.net/qq_40685101/article/details/80859552
19
今日推荐