程式師世界 >> 編程語言 >> C語言 >> C >> 關於C >> Press any key to change color, do you want to try it. Please
Press any key to change color, do you want to try it. Please
編輯:關於C
程序源代碼:
#include
void main(void)
{
int color;
for (color = 0; color < 8; color++)
{
textbackground(color);/*設置文本的背景顏色*/
cprintf("This is color %d\r\n", color);
cprintf("Press any key to continue\r\n");
getch();/*輸入字符看不見*/
}
}
*