论文!课程设计!
//运行环境TC3.0
#include<math.h> //调用数学函数库
#include<stdio.h> //调用标准输入输出函数库 #include<conio.h>
#include<graphics.h> //调用图形函数库
#include<stdlib.h>
#define MAX 8 //定义棋盘格数(特别是横轴方向上) int board[MAX]; //纵轴方向格数
void Drow() //画棋盘
{
int i;
int Driver=VGA,Mode=VGAHI; //初始化显示器
initgraph(&Driver,&Mode,"d:\\tc\\bgi");
setfillstyle(SOLID_FILL,BLUE); //棋盘底色模式
bar(5,15,600,500); //棋盘外框(二维)
setcolor(YELLOW); //棋盘边框颜色
for(i=0;i<=9;i++)
{
line(10,20+50*i,460,20+50*i); //画行
}
for(i=0;i<=9;i++)
{
line(10+50*i,20,10+50*i,470); //画列
}
line(460,20,560,20);
line(10,470,560,470);
line(560,470,560,20);
setcolor(RED);
outtextxy(465,30,"WuShangjie"); //版权注释
outtextxy(465,45,"Eight Queue");
outtextxy(465,60,"CopyRight2.0");
outtextxy(415,440,"Start"); //屏幕输出文本 坐标标记 outtextxy(385,440,"0");
outtextxy(335,440,"1");
outtextxy(285,440,"2");
outtextxy(235,440,"3");
outtextxy(185,440,"4");
outtextxy(135,440,"5");
outtextxy(85,440,"6");
outtextxy(35,440,"7");
outtextxy(415,455,"Point");