百叶窗- -| 回首页 | 2005年索引 | - -文本颜色设置

改变文字背景

                                      

共8种,按任一键会出现下一种,按8次即退出。


 #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("Press any key to continue\r\n");
 getch();
 }
 }

#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("Press any key to continue\r\n");
getch();}
}

【作者: 刘加开】【访问统计:】【2005年04月15日 星期五 22:58】【 加入博采】【打印

Trackback

你可以使用这个链接引用该篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=1207846

回复

- 评论人:kl;k   2006-03-19 11:15:21   

{
textbackground(color);
cprintf("This is color %d\r\n", color);'lkljkjklkj
cprintf("Press any key to continue\r\n");
getch();
}

验证码:   
评论内容: