可以改变输出字体颜色的程序
#include <conio.h>int main()
{int color; char p;
while(1)
{
for(color=0;color<8;color++)
{ p=getch();
if(p=='e') break;
else {
textbackground(color);
cprintf("This is color %d\r\n",color);
cprintf("Press any key to continue\r\n");
printf("'e' to exit"); }
}
if(p=='e') break;
}
return 0;
}