#include<graphics.h>
#include<conio.h>
#pragma warning(disable:4996)
int main()
{
int step = 50;
initgraph(600, 600); //初始化 600 * 600 的画布
setbkcolor(RGB(210,180,140)); //设置背景色为黄色
cleardevice(); //用背景色清空画布
setlinestyle(PS_SOLID, 2); //画实线,宽度为2个像素
setcolor(RGB(0,0,0)); //设置为黑色
int i; //画实线
for (i = 1; i <= 19; i++)
{
line(i * step, 1 * step, i * step, 19 * step); //竖线
line(1 * step, i * step, 19 * step, i * step); //横线
}
getch();
closegraph();
return 0;
}