计算机技术基础课程设计---路边吃数游戏(编辑修改稿)内容摘要:

,1,25,80)。 textbackground(BLACK)。 textcolor(LIGHTGRAY)。 clrscr()。 exit(0)。 } main() { int i,j,key,num,b[20],p。 char ch。 aa: window(1,1,25,80)。 textbackground(LIGHTGREEN)。 textcolor(YELLOW)。 clrscr()。 fu(b)。 num=0。 p=0。 textcolor(LIGHTRED)。 gotoxy(18,1)。 cprintf(%c(UP) %c(DOWN) %c(LEFT) %c(RIGHT),24,25,27,26)。 gotoxy(16,2)。 cprintf(Eat the numbers in your road whose sum is 7,)。 gotoxy(14,3)。 cprintf(and eat 7 in the end, then you will win the game!)。 textcolor(MAGENTA)。 for(i=4。 i21。 i++) for(j=20。 j44。 j++) if(k[i4][j20]==0) { gotoxy(j,i)。 cprintf(%c,219)。 } else if(k[i4][j20]!=1) { gotoxy(j,i)。 cprintf(%d,k[i4][j20])。 } textcolor(YELLOW)。 i=5。 j=21。 gotoxy(j,i)。 cprintf(\1)。 gotoxy(33,5)。 cprintf(7)。 gotoxy(7,7)。 cprintf(num:%d,num)。 textcolor(WHITE)。 gotoxy(11,22)。 cprintf(Press any key to start game, Q key to quit...)。 ch=getch()。 if(ch==39。 Q39。 ||ch==39。 q39。 ) { window(1,1,25,80)。 textbackground(BLACK)。 textcolor(LIGHTGRAY)。 clrscr()。 exit(0)。 } else { textcolor(YELLOW)。 gotoxy(11,22)。 cprintf(。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。