纯C语言的一个程序。
本人对C的一些高级运用还是不了解的。希望各位高人指导一下。这是代码:
#include<stdio.h>
#include<conio.h>
int main()
{
textbackground(LIGHTBLUE);
textcolor(YELLOW);
cprintf("********************************************************************************");
cprintf("* *");
cprintf("* ^_^ Welcome to the game! ^_^ *");
cprintf("* Game Rules: *");
cprintf("* 3 men take 3 retainers and goods to pass the river, the boat carrys *");
cprintf("* 2 persons each time. In passing the river, at any bank number of *");
cprintf("* men must be more than the number of the retainers, or the retainers *");
cprintf("* will kill the men and take the goods. *");
cprintf("* Game operations: <1> Input the number of men and retainers in turn; *");
cprintf("* <2> Input error keys, the game will restart. *");
cprintf("********************************************************************************");
cprintf("* *");
cprintf("* *");
cprintf("* Press any key to start game. <Q key to quit>... *");
cprintf("* *");
cprintf("* *");
cprintf("* *");
cprintf("* *");
cprintf("* *");
cprintf("* *");
cprintf("* *");
cprintf("* *");
cprintf("* *");
cprintf("* *");
cprintf("*******************************************************************************");
gotoxy(61,14);
getch();
}
如何将右下角的那个黑色方块也变成*号。
就像这个图:
注意哦。不能让第一排的*消失。
补充:cprintf("* *");。两个星号之间是有很多空格的。问问不允许连续的多个空格。
追问:显然不行。gotoxy函数只是控制光标的位置。