Dzwebs.Net

撰写电脑技术杂文十余年

C程序:设置文本背景颜色

Admin | 2007-12-29 18:51:06 | 被阅次数 | 9161

温馨提示!

如果未能解决您的问题,请点击搜索;登陆可复制文章,点击登陆

  需求:Press any key to change color, do you want to try it. Please hurry up!

  目标:设置文本的背景颜色

  程序源代码:

  #include <conio.h>

  void main(void)

  {

  int color;

  for (color = 0; color < 8; color++)

   {

   textbackground(color); /*设置文本的背景颜色*/

   cprintf("This is color %d\r\n", color);

   cprintf("ress any key to continue\r\n");

   getch(); /*输入字符看不见*/

   }

  }


网站备案号:

网站备案号:滇ICP备11001339号-7

版权属性:

Copyright 2007-2021-forever Inc. all Rights Reserved.

联系方式:

Email:dzwebs@126.com QQ:83539231 访问统计