网站建设 翰臣科技,wordpress管理后台 主题,网站开发时app打开很慢,网站建设如何制作C语言文字颜色和背景颜色设置
代码
#include stdio.h
#include stdlib.hint main()
{system(color 11) //背景色和文字颜色system(pause)#xff1b;return 0;
}如上代码是输出蓝色背景和蓝色文字。
在所需要改变窗口颜色的位置调…C语言文字颜色和背景颜色设置
代码
#include stdio.h
#include stdlib.hint main()
{system(color 11) //背景色和文字颜色system(pause)return 0;
}如上代码是输出蓝色背景和蓝色文字。
在所需要改变窗口颜色的位置调用函数 system“color xx” xx分别指的是背景颜色和文字前景颜色。x为一位16进制数即1-f都可以使用。可以随意组合。
0 Black 黑 8 Gray 灰 1 Blue 蓝 9 Light Blue (淡蓝 2 Green 绿) A Light Green 淡绿 3 Aqua 水绿 B Light Aqua 4 Red 红 C Light Red 5 Purple 紫 D Light Purple 6 Yellow 黄 E Light Yellow 7 White 白 F Bright White 亮白