五阶魔方阵源代码C语言课程设计.docx
- 文档编号:28954720
- 上传时间:2023-07-20
- 格式:DOCX
- 页数:99
- 大小:31.03KB
五阶魔方阵源代码C语言课程设计.docx
《五阶魔方阵源代码C语言课程设计.docx》由会员分享,可在线阅读,更多相关《五阶魔方阵源代码C语言课程设计.docx(99页珍藏版)》请在冰豆网上搜索。
五阶魔方阵源代码C语言课程设计
主函数
#include
#include
#include
#include"wenjian.c"
#include"sanjie.c"
#include"sijie.c"
#include"wujie.c"
#include"donghua.c"
voiddianz(void)。
voidupbar(inty)。
voiddownbar(inty)。
voidbanyuan(void)。
voidmenulist(void)
{intky,cmd,i。
inty。
intgdriver,mode。
gdriver=DETECT。
initgraph(&gdriver,&mode,"")。
setbkcolor(BLACK)。
setcolor(RED)。
/*rectangle(200,70,440,410)。
*/
dianz()。
y=127.5。
setwritemode(XOR_PUT)。
upbar(y)。
cmd=3。
do
{
ky=bioskey(0)。
switch(ky)
{
caseKey_3:
{cmd=3。
ky=Key_ENTER。
break。
}
caseKey_4:
{cmd=4。
ky=Key_ENTER。
break。
}
caseKey_5:
{cmd=5。
ky=Key_ENTER。
break。
}
caseKey_q:
caseKey_Q:
{cmd=0。
ky=Key_ENTER。
break。
}
caseKey_DOWN:
{{if(y<277.5){
upbar(y)。
y+=75。
downbar(y)。
cmd=cmd+1。
if(cmd==6)
cmd=0。
}
}
break。
}
caseKey_UP:
{if(y>127.5){
{downbar(y)。
y-=75。
downbar(y)。
if(cmd==0)
cmd=6。
cmd-=1。
}
}
break。
}
}
}while(ky!
=Key_ENTER)。
switch(cmd)
{
case0:
exit(0)。
case3:
{
sanjie()。
break。
}
case4:
{
sijie()。
break。
}
case5:
{
wujie()。
break。
}
}
}
main()
{donghua()。
while
(1)
{tuxing()。
menulist()。
clrscr()。
getchar()。
}
}
voiddrawmat(char*mat,intmatsize,intx,inty,intcolor)
/*依次:
字模指针、点阵大小、起始坐标(x,y)、颜色*/
{
inti,j,k,n。
n=(matsize-1)/8+1。
for(j=0。
j j++) for(i=0。 i i++) for(k=0。 k<8。 k++) if(mat[j*n+i]&(0x80>>k))/*测试为1地位则显示*/ putpixel(x+i*8+k,y+j,color)。 } voiddianz(void){ charsan64L[]={ /*以下是'三'地64点阵隶书字模,512byte*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x00, 0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00, 0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x00, 0x00,0x00,0x00,0x00,0x00,0x07,0xC0,0x00, 0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xE0,0x00, 0x00,0x07,0x80,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80, 0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0, 0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0, 0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, }。 charsi64L[]={ /*以下是'四'地64点阵隶书字模,512byte*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x60,0x00,0x00,0x00,0x00,0x06,0x00, 0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0x00, 0x00,0x60,0x00,0x40,0x06,0x00,0x07,0x00, 0x00,0x60,0x00,0x60,0x06,0x00,0x06,0x00, 0x00,0x60,0x00,0x60,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0x60,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0x60,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0x60,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0x60,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0x60,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x00,0xC0,0x06,0x00,0x04,0x00, 0x00,0x60,0x01,0x80,0x06,0x00,0x04,0x00, 0x00,0x60,0x01,0x80,0x06,0x00,0x04,0x00, 0x00,0x60,0x01,0x80,0x06,0x00,0x04,0x00, 0x00,0x60,0x01,0x80,0x06,0x00,0x04,0x00, 0x00,0x60,0x01,0x80,0x06,0x00,0x04,0x00, 0x00,0x60,0x03,0x00,0x06,0x00,0x04,0x00, 0x00,0x60,0x03,0x00,0x06,0x00,0x04,0x00, 0x00,0x60,0x06,0x00,0x06,0x00,0x04,0x00, 0x00,0x60,0x06,0x00,0x07,0x01,0x04,0x00, 0x00,0x60,0x0C,0x00,0x07,0xFF,0x84,0x00, 0x00,0x60,0x08,0x00,0x03,0xFF,0xC4,0x00, 0x00,0x60,0x10,0x00,0x01,0xFF,0xC4,0x00, 0x00,0x60,0x20,0x00,0x00,0x01,0x04,0x00, 0x00,0x60,0x40,0x00,0x00,0x00,0x04,0x00, 0x00,0x60,0x80,0x00,0x00,0x00,0x04,0x00, 0x00,0x61,0x00,0x00,0x00,0x00,0x04,0x00, 0x00,0x62,0x00,0x00,0x00,0x00,0x04,0x00, 0x00,0x64,0x00,0x00,0x00,0x00,0x04,0x00, 0x00,0x70,0x00,0x00,0x00,0x00,0x04,0x00, 0x00,0x60,0x00,0x00,0x00,0x00,0x06,0x00, 0x00,0x60,0x00,0x00,0x00,0x00,0x06,0x00, 0x00,0x60,0x00,0x00,0x00,0x00,0x06,0x00, 0x00,0x60,0x00,0x00,0x00,0x00,0x06,0x00, 0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFE,0x00, 0x00,0x60,0x00,0x00,0x00,0x00,0x06,0x00, 0x00,0x60,0x00,0x00,0x00,0x00,0x06,0x00, 0x00,0x60,0x00,0x00,0x00,0x00,0x06,0x00, 0x00,0x60,0x00,0x00,0x00,0x00,0x06,0x00, 0x00,0x60,0x00,0x00,0x00,0x00,0x06,0x00, 0x00,0x60,0x00,0x00,0x00,0x00,0x06,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, }。 charwu64L[]={ /*以下是'五'地64点阵隶书字模,512byte*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x00, 0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x00, 0x00,0x78,0x00,0x06,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x30,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0x30,0x00,0x07,0x80,0x00, 0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xC0,0x00, 0x00,0x00,0x00,0x30,0x00,0x07,0x00,0x00, 0x00,0x00,0x00,0x30,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0x30,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0x20,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0x60,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0x60,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0x60,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0x60,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0x60,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0x60,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0x40,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0xC0,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0xC0,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0xC0,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0xC0,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0xC0,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0xC0,0x00,0x06,0x00,0x00, 0x00,0x00,0x00,0x80,0x00,0x06,0x00,0x00, 0x00,0x00,0x01,0x80,0x00,0x06,0x00,0x00, 0x00,0x00,0x01,0x80,0x00,0x06,0x00,0x00, 0x00,0x00,0x01,0x80,0x00,0x0C,0x00,0x00, 0x00,0x00,0x01,0x80,0x00,0x0C,0x00,0x00, 0x00,0x00,0x01,0x80,0x00,0x0C,0x00,0x00, 0x00,0x00,0x01,0x80,0x00,0x0C,0x00,0x80, 0x00,0x00,0x01,0x00,0x00,0x0C,0x01,0xC0, 0x00,0x00,0x03,0x00,0x00,0x0C,0x03,0xE0, 0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0, 0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x0
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 魔方 源代码 语言 课程设计
![提示](https://static.bdocx.com/images/bang_tan.gif)