#include<stdio.h>
#include<conio.h>
void main()
{
int i;
char*s[]={"BLACK","BLUE","GREEN","CYAN","RED","MAGENTA","BROWN","LIGHTGRAY"};
textmode(C80);
textbackground(0);
clrscr();
for(i=1;i<8;i++)
{
window(10+i*5,5+i,30+i*5,15+i);
textbackground(i);
clrscr();
textcolor(7+i);
if(i%2==0)
highvideo();
else
lowvide();
cputs(s[i]);
}
getch();
}
文本方式颜色控制函数举例
最新推荐文章于 2022-09-01 10:00:00 发布